[Grails] GORM Embedded table column which declared as a member (property)

Normally member(property) would be mapped as a parent-child relationship, but uses embedded would be mapped as a one table.

Person has a Address object.

And Address class is like below.

Declare as a embedded property, Person table mapped as below.

  • id
  • home_address_number
  • home_address_code
  • work_address_number
  • work_address_code

Each column names are concatenated with _(an underscore) and the parent object name and the child object name.