-
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
Multiple ResponseDescriptors seems to be confusing response object mapping #1719
Comments
I think the problem is in In the init method, when getting the values for the
Later, when the response descriptor for this response is to be selected, we use this in
Thus we end up always using the last response descriptor that was queued to that ObjectManager for the HTTPMethod. In the example above, we use the ResponseDescriptor for |
I do understand I can use |
This is a configuration error. RestKit can only use the response object to match the appropriate response descriptor. By specifying
The only framework change I would consider adding to this is raising an |
This is a pretty nasty bug, and I don't see how its a configuration error. If I am clearly defining a descriptor of type |
Any updates on this? I'm still having this issue. Configuring two RKResponseDescriptors with the same pathPattern but two different RKRequestMethods (e.g. POST and GET) will result in the wrong RKResponseDescriptor being selected when the received data is being parsed. |
Consider a data model with two managed objects:
ObjectA
andObjectB
.I have setup the routes as follows-
The request/response descriptors as setup as follows-
For ObjectA
For ObjectB
Now the problem is, if I have only
ObjectA
's responseDescriptor added to the RKObjectManager, the response toObjectA
'sPOST
response is deserialized and mapped correctly. However, if I addObjectB
's responseDescriptor to RKObjectManager as well, as shown above, then the response toObjectA
'sPOST
response is not deserialized.Is there a limitation in RestKit that only one responseDescriptor per method can be used in an ObjectManager?
The text was updated successfully, but these errors were encountered: