Skip to Content
Jan 08, 2018 at 01:32 PM

SAPUI5: How to update a property which is the key for a navigation property.


I'm using an ODATA V2 model in a SAP UI5 application.

The model contains e.g. a set named CAR and a set named COLOR. The CAR set contains a property colorId which is a 1:n navigation property to COLOR:

<NavigationProperty Name="ColorDetails" Relationship="TestApplication.Car_Color_Many_ZeroToOne0" FromRole="Car" ToRole="Color"/>

My UI5 contains a com boBox with all avaiable Colors so that I can ensure that the user cannot select a value for COLOR which is not in the COLOR set.

When I now send an PUT request to the ODATA services all properties are updated except the property colorId.

Can somebody help me or provide me with an example. Thank you ...