Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix #233: Remove cached backing ObjectIDs when they are unregistered #263

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Pretz commented Dec 18, 2013

When objects were unregistered from AFIncrementalStore, references to the unregistered objects' ObjectIDs were left in _backingObjectIDByObjectID. Since the objects were unregistered (and most likely deleted from the backing store), inconsistencies would arise when objects that were deleted from the backing store were recreated (for instance if an object was removed from a relationship on the remote server, deleted locally, and then added back) as discussed in #233.

It appears that when an objectID is recreated, it still hashes equal to the previous objectID for an object with the same resource identifier, so _backingObjectIDByObjectID would return an objectID referring to an object deleted from the backing store. This change removes the backing object ID from the cache when the objectID is unregistered.

Contributor

mattt commented Nov 18, 2014

As of e8c6472, AFIncrementalStore is no longer being actively maintained. Thank you for your contributions; my sincere apologies for any inconvenience this may have caused.

@mattt mattt closed this Nov 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment