• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
REST PUT request creating related objects rather than just updating them
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: REST PUT request creating related objects rather than just updating them
      • From: Jesse Tayler <email@hidden>
  • Prev by Date: Re: WOWODC 2013 Keynote Theme
  • Next by Date: Re: REST PUT request creating related objects rather than just updating them
  • Previous by thread: Re: WOWODC 2013 Keynote Theme
  • Next by thread: Re: REST PUT request creating related objects rather than just updating them
  • Index(es):
    • Date
    • Thread