On Jun 27, 2007, at 7:42 AM, Simon McLean wrote:

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 ?

Yes, especially if you can provide a minimal reproduction case. If you get access to the seed of the next version, be sure to test against that and update the bug to indicate if it still happens or not.

Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to