Created
October 4, 2012 03:15
-
-
Save sergiomichels/3831262 to your computer and use it in GitHub Desktop.
Adjusts in CompositeDomainClass to make it work
This file contains 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
class CompositeDomainClass implements Serializable { | |
//this is part of the pk | |
MyOtherDomainClass otherDomainClass | |
//other fields here... | |
//and we try to map this | |
static mapping { | |
table 'composite_table' | |
//id composite: ['id','otherDomainClass'], column: 'my_code_field' | |
id composite: ['id','otherDomainClass'] | |
columns { | |
otherDomainClass(column: 'other_table_id') | |
id(column: 'my_code_field') | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment