Search code examples
ioscore-datansmanagedobjectcontextnsundomanager

managed object context is a transactional log?


I heard somewhere that NSManagedObjectContext is a transactional log, so context stores operations with date when they were performed.

Is it right? Am I able to get back this log?


Solution

  • NSManagedObjectContext has

    • insertedObjects
    • updatedObjects
    • deletedObjects

    properties, that contains the aggregated changes, but it has more detailed info too, if undoManager is enabled. Then a transaction log is available, and can undo / redo / reset changes in order as changes were made.