Skip to content

Instantly share code, notes, and snippets.

@sergiomichels
Created October 4, 2012 03:15
Show Gist options
  • Save sergiomichels/3831262 to your computer and use it in GitHub Desktop.
Save sergiomichels/3831262 to your computer and use it in GitHub Desktop.
Adjusts in CompositeDomainClass to make it work
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