REST PUT request creating related objects rather than just updating them
REST PUT request creating related objects rather than just updating them
- Subject: REST PUT request creating related objects rather than just updating them
- From: Catarina Simões <email@hidden>
- Date: Mon, 18 Feb 2013 17:06:45 +0000
Hi all,
I'm using RestKit and ERRest to access services provided from a web app in WO to a OS X app.
I'm doing a PUT to update an object that has several one-to-one relationships. The request sent by RestKit is something like this:
{
"attrib1": "attrib1 value",
"attrib2": "attrib2 value",
"object1": {
"id": 2,
"name": "some name"
},
"id": 1,
"object2": {
"id": 1,
"name": "some other name",
"description": "some description"
}
}
On the WO side the object attributes are updated but also both object1 and object2 are created rather than just updating the relationship to those objects.
The filter I'm using in the update includes all the attributes to the object being updated and also the 2 relationship objects and corresponding attributes.
Shouldn't the WO side recognize the objects in the relationships, fetch them and traverse the relationships and update the already existing objects?
Thanks in advance.
Best regards,
Catarina
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden