Permalink
Browse files

Use relationship destination entity in newValuesForRelationship:...

  • Loading branch information...
1 parent a609b5b commit 54f04e0512d1759d5aa0875f14da825c26b330e6 @mattt mattt committed Oct 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 AFIncrementalStore/AFIncrementalStore.m
@@ -532,7 +532,7 @@ - (id)newValueForRelationship:(NSRelationshipDescription *)relationship
}
[childContext performBlock:^{
- [self insertOrUpdateObjectsFromRepresentations:representationOrArrayOfRepresentations ofEntity:[objectID entity] fromResponse:operation.response withContext:childContext error:error completionBlock:^(NSArray *managedObjects, NSArray *backingObjects) {
+ [self insertOrUpdateObjectsFromRepresentations:representationOrArrayOfRepresentations ofEntity:relationship.destinationEntity fromResponse:operation.response withContext:childContext error:error completionBlock:^(NSArray *managedObjects, NSArray *backingObjects) {
if (![[self backingManagedObjectContext] save:error] || ![childContext save:error]) {
NSLog(@"Error: %@", *error);
}

0 comments on commit 54f04e0

Please sign in to comment.