Skip to content
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

Open
MarcSky opened this issue Oct 13, 2015 · 9 comments
Open

The object returns empty-related objects #2331

MarcSky opened this issue Oct 13, 2015 · 9 comments

Comments

@MarcSky
Copy link

MarcSky commented Oct 13, 2015

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?
2015-10-13 20 14 06
2015-10-13 20 16 05

My thematics mapping

  • (RKMapping *) thematicsMapping {
    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;
}

2015-10-13 20 17 15
Tell me why the data is lost, but come the API and like processed through restkit.

@segiddins
Copy link
Member

What version of restkit are you using? This feels like something we've fixed recently.

@MarcSky
Copy link
Author

MarcSky commented Oct 13, 2015

@segiddins 0.24.1
i install restkit how submodule git

@segiddins
Copy link
Member

Can you try with 0.25?

@MarcSky
Copy link
Author

MarcSky commented Oct 13, 2015

@segiddins did not help

@segiddins
Copy link
Member

Ok, in that case you'll probably have to make a PR with a fix

@MarcSky
Copy link
Author

MarcSky commented Oct 13, 2015

@segiddins Strangely enough, I did all of the documentation.
2015-10-14 2 28 34

@MarcSky
Copy link
Author

MarcSky commented Oct 14, 2015

@segiddins I read that it may be related to memory applications but do not understand what it is

@MarcSky
Copy link
Author

MarcSky commented Oct 16, 2015

My problem is actual please help me((((

@segiddins
Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants