-
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
Add support for @parent and @root pseudo-key-paths #1435
Add support for @parent and @root pseudo-key-paths #1435
Conversation
…n each others' toes
…diate parent within the representation
Thank you sir for the excellent contribution. I'll get this merged and into development later today. |
@percysnoodle are you interested in commit access to the repository? You've made some great contributions |
Added a couple of more test cases and documentation. Merged ti development. |
@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 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! |
Thanks! |
congrats @percysnoodle, and thanks for the awesome feature! |
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. |
Mapping response with "dots" (example: "LUPO.API.Log") in path doesn't work anymore after this merge. |
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? |
See issue #1327 for more details.