In this quick guide i'm trying to explain how to create a structure with data for a deep entity create call in Odata.
Lets assume your collection name as Change request, this contains the hierarchy of entities.
Example:
Change_request
{
ATTRIBUTE 1
ATTRIBUTE 2
Material
MATNR
TXTLG
Classification
CLASS
CHARACTERISTICS
}
In the Metadata you will get the name of the association(which is the name of the relation between the entities), you have to use the association nameinstead of the entity name in the JSON structure.
An example data looks like:
change_request{
ATTRIBUTE1: VALUE
ATTRIBUTE2: VALUE
Association_name1:
[
TXTLG: VALUE
]
Association_name2
[
CLASS: VALUE
CHARACTERISTICS: VALUE
]
}
Please note even you have a single entry for the sub entities it should be in an array.