Hi list,

i have a huge data modell and allways use factory methods to create and init
EO's. I'm using the defaultEditingContext.

In some of the factory methods i assign a Division "d" to a (n:1) relation
by the setter (Division is a derived class in a vertical inheritance). "d"
is taken from person.defaultDivision, a parameter to the factory method.

    theEvent.setDivision ( d );

When i edit theEvent in a page, I'm able to set theEvent to another
divisione from a popup listbox. The Listbox is bound to a list from a
session EO, i.e. client.divisions. The data is saved correctly to the
database.

When i change the factory method to use

    theEvent.addObjectToBothSidesOfRelationshipWithKey ( d, "division" );

and continue doing the same (change the division via popup listbox), on the
first save the wrong division is saved. I can see that the wrong fk is
written.
Tracing the values of the division in the save cycle shows the correct value
before **and** after the saveChanges.
When i open theEvent again and change the list value and save again, the fk
is saved to the correct value.


Anybody seen this?
I was told to use addObjectToBothSidesOfRelationshipWithKey liberally (Hi
Chuck :-), Page 38 ).


Wolfram


 _______________________________________________
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