Details
Description
given the same basic Domain I was using in the attached example
http://jira.codehaus.org/browse/GRAILS-3209
subclassing a tree doesn't inherit
for
class Party{}
class Organization extends Party {
static hasMany = [children: Organization]
Organization parent
}
class ExtOrganization extends Organization{}
For this the parent/children relationship won't work for ExtOrganization, even when viewed as Organization.
The relationship/mappings/ownership should just be inherited, but they are not.
First, this will thrown an error saying the there needs to be owner defined between ExtOrganization and Organization.
So you can add
belongsTo = Organization
to get past that.
But the parent/children mapping is broken and the children collection returns nothing for instances of ExtOrganization despite having parents set. This is true if viewed as Organization or ExtOrganization. Although instances of Organization work.
attach example
click on Load Test Data
view Organization or ExtOrganization list
view instances of ExtOrganization (name Ext*)
oops, forgot to set
component = Persistance
effected versions = 1.0.3