RestKit/RestKit — pull request #1042 by lysannkessler (2012-11-24 02:21:27+00:00)
Title: Correctly ignore unknown key paths

I made two changes in order to make object mapping's ignoreUnknownKeyPaths=YES behave as expected:

1. Previously, if ignoreUnknownKeyPaths was YES and an attributeMapping from an empty string was specified, the attribute was not mapped because no source object would respond to a message with an empty string as name. This is fixed in the first commit by first checking the empty string attribute, and then checking for ignoreUnknownKeyPaths etc..

2. When mapping relationships, ignoreUnknownKeyPaths was not checked before trying to resolve the key path. This resulted in an annoying warning message for each such relationship. In the second commit, I matched the behaviour with the original attribute mapping behaviour: if ignoreUnknownKeyPaths is YES, it first checks whether the source object responds to the key path selector before actually resolving the key path.

I hope you find this useful.
If there are any issues with this pull request, please let me know.
Cheers,
Lysann