Created
July 4, 2011 08:24
-
-
Save sourcerebels/1063060 to your computer and use it in GitHub Desktop.
One to Many relationship in GORM (Grails)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pim | |
class Project { | |
static hasMany = [ tasks : Task] | |
String code | |
String summary | |
User owner | |
static constraints = { | |
code(blank : false, unique : true, nullable : false) | |
summary(blank : false, nullable : false) | |
owner(blank : false, nullable : false) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment