NSManagedObject relationship undo
Posted
by Reflog
on Stack Overflow
See other posts from Stack Overflow
or by Reflog
Published on 2010-03-17T17:00:03Z
Indexed on
2010/03/17
17:01 UTC
Read the original article
Hit count: 373
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?
© Stack Overflow or respective owner