Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fixing copy-paste error that would incorrectly establish relationship…
Browse files Browse the repository at this point in the history
…s between objects between backing and canonical contexts
  • Loading branch information
adamhowardprice authored and mattt committed Oct 18, 2012
1 parent a938515 commit 18805da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AFIncrementalStore/AFIncrementalStore.m
Expand Up @@ -257,10 +257,10 @@ - (void)insertOrUpdateObjectsFromRepresentations:(id)representationOrArrayOfRepr
if ([relationship isToMany]) {
if ([relationship isOrdered]) {
[managedObject setValue:[NSOrderedSet orderedSetWithArray:managedObjects] forKey:relationship.name];
[backingObject setValue:[NSOrderedSet orderedSetWithArray:managedObjects] forKey:relationship.name];
[backingObject setValue:[NSOrderedSet orderedSetWithArray:backingObjects] forKey:relationship.name];
} else {
[managedObject setValue:[NSSet setWithArray:managedObjects] forKey:relationship.name];
[backingObject setValue:[NSSet setWithArray:managedObjects] forKey:relationship.name];
[backingObject setValue:[NSSet setWithArray:backingObjects] forKey:relationship.name];
}
} else {
[managedObject setValue:[managedObjects lastObject] forKey:relationship.name];
Expand Down

0 comments on commit 18805da

Please sign in to comment.