ios - RestKit - Nil being mapped in nested object for relationships -


I get the following JSON from my server endpoint:

  {(. "," Comments ": [" user ": {" account ":" free "," name ":" Brookwain "," counter ": {" picture ": 10," following ": 0," followers ": "2014-04-28 T16: 22: 47 + 0200"}, {0}, "tag":}, "id": "QYgZb"}, "text": "how are you?", "Date "", "Name": "God, Abdul", "Counter": {"Picture": 19, "Following": 0, "Followers": 0, "Tags" : 1}, "id": "abde"}, "text": "ala_mai_koyet Correc with coreta structure i Keeping the comments objects in mind, keeping in mind the <*>  code   

 Enter image details here

User:

Here - (zero) Map Comment {commentsMapping = [RKEntityMapping mappingForEntityForName: @ " Comment "managed objectstore: [self managed objectstore]]; [CommentsMapping settingEditification attitudes: @ [@ "date", @ "text"]]; [Adding comments to addAttributeMappingsFromDictionary: @ {@ "text": @ "text", @ "@metadata. Routing.premators. PictureId": @ "photo id", @ "user.id": @ "user id", @ " Username.name ": @" user name ", @" date ": @" date "}]; [AddConnectionForRelationship to add comments: @ "user" is linked: @ "userId"]; [AddConnectionForRelationship to add comments: @ "Picture" is linked: @ "Picture ID"]; RKResponseDescriptor * CommentShutReponseDescriptor = [RKResponseDescriptor responseDescriptorMapping: CommentsMapping Method: RKRequestMethodAny pathPattern: @ "/ v1 / pictures /: pictureId / comments" keyPath: zero conditioned codes: RKStatusCodeIndexSetForClass (RKStatusCodeClassSuccessful)]; [[Self object manager] addResponseDescriptor: Comment ReponseDescriptor]; RK objectmapping * Remarketext mapping = [RK object mapping request mapping]; [CommentRequestMapping addAttributeMappingsFromDictionary: @ {@ "text": @ "text"}]; RKRequestDescriptor * requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping: commentRequestMapping ObjectClass: [annotation class] Rootkeypath: zero method: RKRquenstemepiani]; [Self.objectManager addRequestDescriptor: requestDescriptor]; // Roots RKRURT * CommentPictureRelBCTRTE = [RKRUR RouteAuth class: [comment class] Pathparents: @ "/ V1 / picture / picture ID / comments" method: RKRquenstmethanye]; [[[[Self object manager] router] Margasat] Aadder Route: commentaryRTTRAT]; }

The problem with this configuration is that mapping does not work as expected, I have correctly mapped the image object but unfortunately I can not map Restkit to user objects. All user references to zero are fine after restarted by RestKit. I would like to configure such relationships as the user object is correctly identified and mapped as a new user object in the coredata, with the correct relation and commentary example among themselves. I would also like to mention that these relationships are one-to-many relationships.

You currently comment and OK for connection

What you need to add is a new mapping for a user and a new response descriptor such that users can be processed. After that, connections will be made after both users and comments are mapped.

The only important part of the information is the important path to use on the response descriptor, which drill to the right level in the source data for the comments.user mapping.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -