mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-01-12 22:51:50 +08:00
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".
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user