Resending with some typos fixed... :-)

Hi,

Let's say you have to-many relationship between two entities: Order <-->> OrderItem. The to-many relationship is called "items" and "Owns Desintation" is checked.

Test #1: Create an Order and OrderItem and insert both into an editing context. Then add the item to the order using order.addObjectToBothSidesOfRelationshipWithKey(item, "items"). Then removeObjectFromBothSidesOfRelationshipWithKey(item, "items") to remove the item. Then save the editing context.

Result:   EOF attempts to save both the order and the orphan item.
Expected Result: I thought EOF would only attempt to save the order but not the item removed from the "items" to-many.

Test #2: Fetch an existing order with one item from the database. Then order.removeObjectFromBothSidesOfRelationshipWithKey(item, "items"). Save the editing context.

Result:  EOF deletes the item that was removed from the "items" to-many.

Is this how it's supposed to work?

Thanks,
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]

Reply via email to