Re: Map an Object in ERRest
Re: Map an Object in ERRest
- Subject: Re: Map an Object in ERRest
- From: Samuel Pelletier <email@hidden>
- Date: Sat, 11 Jun 2016 11:38:29 -0400
Rodrigo,
If the json format does not fil the EO, I think you will have to create it manually and set the values from the requestNode().
ERXRestRequestNode is keyValueCoding compliant, you can do something like this:
requestNode = requestNode(); newEO = EOUtilities.createAndInsertInstance(editingContext(), "EntityName"); newEO.setXyz(requestNode.valueForKey("xyz"));
Samuel
Le 9 juin 2016 à 23:37, Rodrigo de Sousa < email@hidden> a écrit :
Hello Samuel,
Thanks for your answer.
I forgot to mention, but in my case I got this problem to create the object.
The method that I got the error is this: ERXRouteController.create(String entityName, ERXKeyFilter filter)
I know that I can use the filter to use with primitive attributes but it not work with Object.
Do you have any idea in my case to create an object and don't change my old API?
Thanks again, Rodrigo.
|
_______________________________________________
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