I admit I am sort of lost in the things.
So far I lived in impression that (if we ignore undo) there's only one kind of snapshots: OSC-level shared snapshots of what-was-just-saved-into-DB.
I've tried to research the thing a bit and there seem to be at the very least the following snapshots:
(i) EC.committedSnapshotForObject
(ii) EC.currentEventSnapshotForObject
(iii) EODatabaseContext.snapshotForGlobalID
(iv) EODatabaseContext.localSnapshotForGlobalID
I regret to say the standard documentation does not help much. I did some testing and it looks like
- (iii) is the one snapshot I knew: whenever save finishes, it always contains the newly saved values
- (i) and (ii) — which for me always contain same data, that's weird! — seem to contain an EC-level snapshot stored at its (first) willChange. Also it looks like those “locally uncommitted changes” are based on (one of) these. So far though I haven't found a case when (i) would differ from (ii)... although, based on the name, I would actually presume (i) should be the same as (iii). It very definitely is not.
- (iv) I don't understand at all :(
Are those things somewhere documented in detail?