Hi All,
I need to iron out this one now. :-) I'm gonna borrow David Leber's
example from his blog at http://davidleber.net :
EOEditingContext parentEc = ERXEC.newEditingContext();
Person person = Person.newPerson(parentEc);
EOEditingContext childEc = ERXEC.newEditingContext(parentEc);
Address address = Address.newAddress(childEc);
childEc.saveChanges(); // move changes into my parent
Notice that person is a new EO (i.e. never been saved to the
database). The address EO is also new except that it is being created
in the child editing context.
Now, saving the child editing context is supposed to push the changes
to the parent editing context, except that it fails in my test case
because I have the following mandatory relationship:
Person <-->> Address
How is something like this handled? Am I supposed to make the
relationship optional or is there another way around this?
Thanks again in advance,
Ricardo
_______________________________________________
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]