mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-01-12 22:51:50 +08:00
The relationship variable was missing.
In the example, a variable named "relationship" is used, but not created. On the line above, another variable "userRelationship" is created but not used. I'm assuming this is a typo, and they are supposed to be the same?
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
|
||||
NSEntityDescription *projectEntity = [NSEntityDescription entityForName:@"Project" inManagedObjectContext:managedObjectContext];
|
||||
NSRelationshipDescription *userRelationship = [projectEntity relationshipsByName][@"user"];
|
||||
RKConnectionDescription *connection = [[RKConnectionDescription alloc] initWithRelationship:relationship attributes:@{ @"userID": @"userID" }];
|
||||
RKConnectionDescription *connection = [[RKConnectionDescription alloc] initWithRelationship:userRelationship attributes:@{ @"userID": @"userID" }];
|
||||
|
||||
Note that the value for the `attributes` argument is provided as a dictionary. Each pair within the dictionary correspond to an attribute pair in which the key is an attribute on the source entity (in this case, the `Project`) and the value is the destination entity (in this case, the `User`).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user