I am developing a simple sapui5 1.38.x based of a Master Detail template.
In the Project there is a NavigationProperty called Currency it is a simple relation many2one on the database
you can see the snipper of the $metadata of this two entity
<EntityType Name="Project">
<Key>
<PropertyRef Name="Id"/>
</Key>
<Property Name="Description" Type="Edm.String" Nullable="false" MaxLength="255"/>
<Property Name="Id" Type="Edm.Int64" Nullable="false"/>
<Property Name="Price" Type="Edm.Single"/>
<NavigationProperty Name="Currency" Relationship="org.uurla.projects.projman.db.persistence.Project_Currency_Many_One0" FromRole="Project" ToRole="Currency"/>
<NavigationProperty Name="Tasks" Relationship="org.uurla.projects.projman.db.persistence.Project_Task_One_Many0" FromRole="Project" ToRole="Task"/>
</EntityType>
<EntityType Name="Currency">
<Key>
<PropertyRef Name="Curcod"/>
</Key>
<Property Name="Curcod" Type="Edm.String" Nullable="false" MaxLength="4"/>
<Property Name="Curdes" Type="Edm.String" Nullable="true" MaxLength="20"/>
</EntityType>
{
"Description":"prova312",
"Price":1,
"Currency": { "__metadata":
{
"uri": "Currencys('EUR')",
"type": "org.uurla.projects.projman.db.persistence.Currency"
}
},
"__metadata":{
"type":"org.uurla.projects.projman.db.persistence.Project",
"uri":"Projects('id-1471129553866-22')"
}
}
SAPUI5 - oData Operations (Create/Update/Delete) - Part 2 - YouTube