-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The object returns empty-related objects #2331
Comments
What version of restkit are you using? This feels like something we've fixed recently. |
@segiddins 0.24.1 |
Can you try with 0.25? |
@segiddins did not help |
Ok, in that case you'll probably have to make a PR with a fix |
@segiddins Strangely enough, I did all of the documentation. |
@segiddins I read that it may be related to memory applications but do not understand what it is |
My problem is actual please help me(((( |
I'm sorry, I don't really have time to debug RestKit at the moment, but I'd be more than happy to review a PR with a fix :) |
faced with the problem that the object returns the related objects as empty (link to many). And he returns them empty through time. The API data arrives intact, in the debugger can be seen that restkit accepted them. But he says that getting the data there. I have an older version of the library and working with ios 9. I can update the library?
My thematics mapping
RKEntityMapping *mapping = [RKEntityMapping mappingForEntityForName:@"Thematic" inManagedObjectStore:[RKManagedObjectStore defaultStore]];
[mapping addAttributeMappingsFromDictionary:@{@"id":@"objectId", @"name": @"name" }];
mapping.identificationAttributes = @[@"objectId"];
return mapping;
}
My article mapping
+(RKMapping *) articlesMapping {
RKEntityMapping *mapping = [RKEntityMapping mappingForEntityForName:@"Article" inManagedObjectStore:[RKManagedObjectStore defaultStore]];
[mapping addAttributeMappingsFromDictionary:@{ @"id":@"objectId", @"title":@"title", @"text":@"text", @"date_create":@"dateCreate",@"likes":@"likes",@"avatar":@"imagePath", @"pressed":@"pressed", @"subtitle":@"subtitle",@"url":@"url",@"count":@"count",@"top":@"top",@"local_top":@"localTop"}];
mapping.identificationAttributes = @[@"objectId"];
[mapping addPropertyMapping:
[RKRelationshipMapping relationshipMappingFromKeyPath:@"thematics"
toKeyPath:@"thematics"
withMapping:[self thematicsMapping]]
];
[mapping addPropertyMapping:
[RKRelationshipMapping relationshipMappingFromKeyPath:@"authors"
toKeyPath:@"authors"
withMapping:[self authorsMapping]]
];
return mapping;
}
Tell me why the data is lost, but come the API and like processed through restkit.
The text was updated successfully, but these errors were encountered: