I followed all of the rules… I did everything they told me to do… It even says that you can do this like normal GORM can…

A real simple structure:

package blah

class Author {
	String name
	static hasMany = [fiction:Book]
        static constraints = {
        }
}



package blah

class Book {
	String title
	static belongsTo = [ author: Author ]

    static constraints = {
    }
}



And from the example I tried…

import blah.*

def fictBook = new Book(title:"IT")
def nonFictBook = new Book(title:"On Writing: A Memoir of the Craft")
def a = new Author(name:"Stephen King").addToFiction(fictBook).save()



And I’m left with…

No signature of method: mongograilsquickstart.Author.addToFiction() is applicable for argument types: (mongograilsquickstart.Book)



This seems to just not work… Hit me up if you made this work, otherwise I’m gonna push a bug… dan@rhcedan.com


Even though we’re Red Hat people and would much prefer to use the Developer Studio for everything, sometimes we need to integrate into groups and teams who use Eclipse for development…

I jest (a little) about the Dev Studio, I am in fact a big time Eclipse fan — it is an amazing tool and is the de facto standard (would you take RC Cola over Coca Cola? didn’t think so…).

So, tonight I’ve fired up the new RELEASE verison of STS and plugged in the elite Groovy/Grails support… First impression: STS 2.6.0 is blazing fast… It’s really awesome. I like the new Groovy support a lot. In my 8-5, I use Eclipse 3.5 for development w/ nothing special on the Groovy end… The code completion and syntax highlighting in STS 2.6.0 is stellar and immediately worked great for a GRAILS 1.3.7 project. I’m happy :-)

EDIT: One huge fucking problem that I’ve found is that if I have compilation errors in my projects when firing up STS, it will crash… Not sure if this is due to some ghettoness in my configuration or if this is standard behavior, but not cool either way…



download the drizzle-jdbc package… here’s the maven repo

download the drizzle dialect (thanks to this guy)

create your tables based off of your grails domain classes…

setup your datasource, as such:

dataSource {
            pooled = true
            dbCreate = "update"
            url = "jdbc:drizzle://localhost:4427/database?autoReconnect=true"
            driverClassName = "org.drizzle.jdbc.DrizzleDriver"
            dialect = org.drizzle.hibernate.dialect.DrizzleDialect
            username = "root"
            password = ""
}

when you setup drizzle, it will let you connect as root with no password… i’ll post an update on how to add a user when i figure it out…

The Intro

The past twenty years have been the evolution and progression of the IT industry from intellectual math nerd to grunge, anti-social, do-it-yourself computer geek, to a fully matured, professional, and competitive industry of the 21st century. There’s no getting around the fact that even in the past decade the rules of the game have changed… You can’t hope to skate by any more on that unemployed dropout look that worked so well for the pioneers and founding fathers of our modern internet… It’s just not feasible. So with this in mind, I have decided to outline some of the more common-sense things that you should consider when marketing your IT-self to a prospective employer. These ideas are not an ace-in-the-hole on landing the job, they are simply observations and topics of consideration when you are interviewing for an IT position at a company… Continue reading »
© 2013 Dan's Blog Suffusion theme by Sayontan Sinha