Hi,

I am playing with Rest Wonder framework with the ERRestRouteExample example.

Accessing the person id = 2 
http://127.0.0.1:53753/cgi-bin/WebObjects/RESTExample.woa/ra/Person/2.json give 
me this detail :
"id":2,"type":"Person","name":"Mike",
            "company":{"id":1,"type":"Company","name":"mDT"},
            "pets":[
                        {"id":2,"type":"Pet","name":"Derby"},
                        {"id":1,"type":"Pet","name":"Sydney"}
            ],
            "derivedCurrentTime":"2019-10-30T12:37:08Z"
}



I trying to deeply update this person using this json with a PUT command :
{
"id":2,"type":"Person","name":"Michel",
            "pets":[
                        {"id":2,"type":"Pet","name":"Derby2"},
{"type":"Pet","name":"My new dog"}
                        ]
}

The EO is correctly updated :
- the person name is changed
- the name of pet# 2 is changed
- a new dog is created and added to pets relation
- pet #1 is remove from the pets relation.


At save time, the remove of pet #1 fails as EOF try to nullify its ownerId 
instead of remove it.

Is there a solution modifying my PUT command  ?
Or does that mean that I need to use an additionnal DELETE command before PUT 
command ?


Thanks in advance for any help
Pierre



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to