From 2fa9b52dbaf3fad36eee846d7c6b9c35455f5db9 Mon Sep 17 00:00:00 2001 From: Victor Widell Date: Fri, 15 Feb 2013 18:27:28 +0100 Subject: [PATCH] The "teamMembers" variable was not used. The variable "relationship" is not defined, and looks like it should be "teamMembers" instead. This is a bit inconsequent with the example above, that is named "userRelationship". Either both or neither of them should include the word "relationship". --- Code/CoreData/RKConnectionDescription.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/CoreData/RKConnectionDescription.h b/Code/CoreData/RKConnectionDescription.h index 00826a1a..8697c41d 100644 --- a/Code/CoreData/RKConnectionDescription.h +++ b/Code/CoreData/RKConnectionDescription.h @@ -62,7 +62,7 @@ NSEntityDescription *projectEntity = [NSEntityDescription entityForName:@"Project" inManagedObjectContext:managedObjectContext]; NSRelationshipDescription *teamMembers = [projectEntity relationshipsByName][@"teamMembers"]; // To many relationship for the `User` entity - RKConnectionDescription *connection = [[RKConnectionDescription alloc] initWithRelationship:relationship attributes:@{ @"teamMemberIDs": @"userID" }]; + RKConnectionDescription *connection = [[RKConnectionDescription alloc] initWithRelationship:teamMembers attributes:@{ @"teamMemberIDs": @"userID" }]; When evaluating the above JSON, the connection would be established for the 'teamMembers' relationship to the `User` entities whose userID's are 1, 2, 3 or 4.