Re: Duplicate objects in a relationship
Re: Duplicate objects in a relationship
- Subject: Re: Duplicate objects in a relationship
- From: Simon McLean <email@hidden>
- Date: Wed, 27 Jun 2007 15:42:38 +0100
Hi All -
Firstly thanks to all who responded and sorry for the delay in
responding - i snuck in a weeks holiday!
I finally got to the bottom of this problem and as suggested it
turned out to be an inheritance issue. However, i think it is
possibly a bug rather than a model problem. Here's what i found:
Each of the entities concerned is a child of an abstract parent (all
single-table inheritance).
AbstractOrganisation --> Client
AbstractUser --> Employee
AbstractUserRole --> EmployeeRole
The relationships concerned are between the child entities:
Client <---->> Employee
Client <---->> EmployeeRole
Employee <<----> EmployeeRole
The problem is displayed when traversing the keypath
"client.employeeRoles" from an Employee object (in other words
Employee ----> Client ---->> EmployeeRole). Interestingly, it is not
displayed when traversing the keypath "employeeRoles" from a client
object itself.
The solution was to move all of the relationships up to the abstract
parent entities:
AbstractOrganisation <---->> AbstractUser
AbstractOrganisation <---->> AbstractUserRole
AbstractUser <<----> AbstractUserRole
Then it all works fine.
That looks like a bug to me as I use relationships between child
entities in other places with no problems. Is it worth sticking it on
Radar ?
Simon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden