The documentation says:
- (void)reset
Returns the receiver to its base state.
Discussion
All the receiver\'s man
The key part is in the quote
All the receiver's managed objects are “forgotten”.
- (void)reset;
will give you a clean NSManagedObjectContext
with no objects in it and as the docs state any NSManagedObject
's you have around should be discarded as they are no longer valid.
- (void)rollback
will just restore the NSManagedObject
's to their persisted values
-reset
is different than -rollback
in that it invalidates any NSManagedObject
s that have been fetched from the context. Attempting to use those objects can be expected to throw an exception. However -rollback
simply discards unsaved changes.