ERRestRouteExample
ERRestRouteExample
- Subject: ERRestRouteExample
- From: GILQUIN Pierre via Webobjects-dev <email@hidden>
- Date: Wed, 30 Oct 2019 12:03:02 +0000
- Ironport-sdr: N7XZwpW1wwt8ejEoFrqJG+M663oUPYd3A3n7whYDDPC0muOHZqE2uB5Av7juCidAX5GRvU16C/ pBhI+B1iSE/g==
- Ironport-sdr: XQV+Hmzn6FY4D1wAWc6SpgEVZwUTE5cG1qxDUCmut6wgvI9r8gsKav0+ggVC5ijTmWcSLnrmrx Ow98Ce6+8+fg==
- Thread-topic: ERRestRouteExample
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden