Skip to content


Subversion checkout URL

You can clone with
Download ZIP


relationshipValue in backingObject get lost while updateBackingObject #134

merged 1 commit into from

2 participants


The method updateBackingObject transfer the relationship value of managedObject into backingObject. There is a typo that a nil value mutableBackingRelationshipValue is transferred. So the existing relationship value of backingObject get lost after this method.


@mattt this is an obvious typo which will cause strange error during inserting new record. I hope you can check it and fix it asap.

@mattt mattt merged commit 7d5ad17 into AFNetworking:master

Indeed it is. I'll package all of the latest commits into a new tiny release now.

@alvinhu alvinhu deleted the alvinhu:relationshipValue-in-backingObject-get-lost-while-updateBackingObject branch
@alvinhu alvinhu restored the alvinhu:relationshipValue-in-backingObject-get-lost-while-updateBackingObject branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  AFIncrementalStore/AFIncrementalStore.m
2  AFIncrementalStore/AFIncrementalStore.m
@@ -220,7 +220,7 @@ - (void)updateBackingObject:(NSManagedObject *)backingObject
mutableBackingRelationshipValue = [NSMutableSet setWithCapacity:[relationshipValue count]];
- for (NSManagedObject *relationshipManagedObject in mutableBackingRelationshipValue) {
+ for (NSManagedObject *relationshipManagedObject in relationshipValue) {
if (![[relationshipManagedObject objectID] isTemporaryID]) {
NSManagedObjectID *backingRelationshipObjectID = [self objectIDForBackingObjectForEntity:relationship.destinationEntity withResourceIdentifier:AFResourceIdentifierFromReferenceObject([self referenceObjectForObjectID:relationshipManagedObject.objectID])];
if (backingRelationshipObjectID) {
Something went wrong with that request. Please try again.