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