Inheritance and ERRest
Inheritance and ERRest
- Subject: Inheritance and ERRest
- From: Charles Young <email@hidden>
- Date: Thu, 09 Feb 2012 15:39:33 -0800
Hi,
I have a hierarchy of objects using horizontal inheritance:
Entity A is Abstract - ordinal - type
Entity B : has Parent Entity A - rating
Entity C : has Parent Entity A - text
I also have an Entity Z that has a to-many relationship "contents" with Entity A
My question is:
I want to create an instance of Entity Z that has several Entity Bs and Entity Cs. How do I let ERRest know which classDescription to use?
For example with JSON string like:
{ "nameText":"An Interesting Name", "type":"Entity Z", "contents": [{ "ordinal":"1", "text":"This is some text content", "type":"Entity C" }], [{ "ordinal":"6", "rating":"1.5", "type":"Entity B" }] }
Is there a way of extracting the 'type' so that ERRest will use the correct classDescription when creating and updating entities?
Thanks
Charles
Charles Young NEURAL GLUE
503.360.3178
|
_______________________________________________
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