Hi,
I modeled the following relationships
Party ->> ContactMechanism -> Email
Party ->> ContactMechanism -> Phone
Party ->> ContactMechanism -> PostalAddress
And flattened the relationships into Party. My D2W rules are setup so that this to many relationships are edited with a ERMODEditRelationshipPage component. The to one relationships from ContactMechanism to the other entities are optional, since a ContactMechanism can be either an Email, a Phone or a PostalAddress, but not two of them at the same time.
I am able to edit the flattened entities but when the Party entity is saved the following exception is raised:
IllegalStateException: A valid global ID could not be obtained for entity named ContactMechanism, relationship named contactMechanisms_phone, primary key dictionary {partyID = 2; phoneID = 7; }.
at com.webobjects.eoaccess.EODatabaseContext.databaseOperationForIntermediateRowFromSourceObject(EODatabaseContext.java:4871)
I've searched the list and there are other similar cases where the solution was to change the model with the appropriate "owns destination" or "propagates primary key" properties for the intermediate relationship. From what I've read, even the delete rule can affect how EO will deal with the flattened relationships.
I didn't find a way to set up my model so that EO will handle the flattened relationships as I want. Or perhaps I am simply trying to do something the wrong way. Anyway, I need some help.
Thanx,
Angelo
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