I'd like to undo a save-operation on my NSManagedObjectContext; I always thought, that's what the NSUndoManager is for, but it seems as if undoing over a save-operation doesn't work...
An example:
[[NSManagedObjectContext MR_contextForCurrentThread] setUndoManager:[NSUndoManager new]];
[[NSManagedObjectContext MR_contextForCurrentThread].undoManager beginUndoGrouping];
MyDataObject *mdo = [MyDataObject MR_createInContext:[NSManagedObjectContext MR_contextForCurrentThread]];
mdo.name = @"...";
[[NSManagedObjectContext MR_contextForCurrentThread] save:nil];
[[NSManagedObjectContext MR_contextForCurrentThread].undoManager endUndoGrouping];
[[NSManagedObjectContext MR_contextForCurrentThread].undoManager undo];
But the insertion is not undone... is there no way to achieve this? Like a transaction?