I recently noticed this strange thing about the cancellation mechanism in Core Data, and it has been bothering me since then.
Quote from the NSManagedObjectContext documentation for the -undo method:
Sends a cancellation message to the receiver cancellation manager with a request to discard the last uncommitted changes applied to the objects in the object graph.
To undo the last uncommitted changes sounds easy, right?
However, this is not what is actually happening! Even if I save the context with the changes to the managed entity, the next call to -undo will still successfully -undo changes. Is this not against what is indicated in the documents?
Maybe I'm doing something wrong? If necessary, I can send my little test code. I'm really confused.
source share