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

Add support for @parent and @root pseudo-key-paths #1435

Closed

Conversation

percysnoodle
Copy link
Member

See issue #1327 for more details.

@ghost ghost assigned blakewatters Jun 7, 2013
@blakewatters
Copy link
Member

Thank you sir for the excellent contribution. I'll get this merged and into development later today.

@blakewatters
Copy link
Member

@percysnoodle are you interested in commit access to the repository? You've made some great contributions

@blakewatters
Copy link
Member

Added a couple of more test cases and documentation. Merged ti development.

@percysnoodle
Copy link
Member Author

@blakewatters Yes, I'd be interested. In general think I'd continue to submit pull requests as I think the review step is valuable, but it would be good to be able to help you out where needed. Thanks!

@percysnoodle percysnoodle deleted the parent_source_object branch June 10, 2013 07:33
@blakewatters
Copy link
Member

@percysnoodle I have added you to the RestKit Core team, you now have push/pull access to all the repositories in the organization.

Rules of the road: if there's a technical design aspect to whatever you are touching then shoot up a pull request or push a branch so we can collaborate on getting the design right. If you decide to tackle a bug, want to touch up documentation, etc. feel free to jump in and push directly to the development branch. Just try to pin down any bugs with test coverage so we can stay off the regression treadmill. Other than that, welcome aboard!

@percysnoodle
Copy link
Member Author

Thanks!

@airdrummingfool
Copy link

congrats @percysnoodle, and thanks for the awesome feature!

@adeperio
Copy link

Nice one people! I literally have just needed this feature in my project just now and it's nice to have seen this just merged through! Awesome.

@0ldF0x
Copy link

0ldF0x commented Jul 29, 2013

Mapping response with "dots" (example: "LUPO.API.Log") in path doesn't work anymore after this merge.
See details at: https://groups.google.com/forum/#!topic/restkit/Btp1TXwQhok

@radeeccles
Copy link

Perhaps I don't understand how the @root and @parent is intended to work but my assumption is that while specifying mapping attributes in a dictionary I would be able to use @root. and @parent. to traverse UP the hierarchy of the response output.

However, mapping attributes by attempting to use this technique fail to map. After doing some debugging I have come down to line 286 in RKMapperOperation.

id mappingSourceObject = [[RKMappingSourceObject alloc] initWithObject:representation parentObject:nil rootObject:representation metadata:self.metadata];

In this case the parent object is always nil; thus, the @parent doesn't seem to work.

Also note that the object being mapped is ALSO set as the rootObject. Shouldn't the root object be set to the root of the output structure and the parent be set accordingly down the hierarchy?

Is this a bug or am I missing something?

4PixelsDev pushed a commit to CenterDevice/RestKit that referenced this pull request Dec 12, 2013
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

Successfully merging this pull request may close these issues.

None yet

6 participants