views:

95

answers:

0

I have a NSManagedObject ObjA that has a many-to-many relationship with another NSManagedObject ObjB.

I initialize it with [NSEntityDescription insertNewObjectForEntityForName:@"ObjA" inManagedObjectContext:app.context];

When I perform undo without performing save - the object is not added to the persistent store.
But - when I add an item to the collection inside ObjA and then perform undo - the ObjA is not added, but ObjB is not, it's still lingering in the persisten store for some reason.

Any ideas what am I doing wrong?