sapui5 - How map authorizations (and other sub-infos) in oData structure -
this base schema of odata edm: thanks image filippo
i have db structure:
product (code, description, iva, price) |n | | | |1 purchase(id, product, customer)
i want expose data using odata; can map in natural way product , purchase in 2 entityset: productset , purchaseset.
if require example items of productset receive collection of 100 products; each product have 4 properties, example:
{ code:01, description: "blue pen", iva: "19", price: "2.99" }
ok based on user logged, business logic before odata want send me more information (for example editable sub property):
{ code: {value:01, editable:false}, description: {value:"blue pen", editable:false}, iva: {value:19, editable:true}, price: {value:"2.99", editable:true} }
(i can't sent new information in mode, have entity sets , properties...)
what right way map editable infos in edm? new property??
you can achieve creating complextype have properties of value , editable. properties of entity refer complextype.
Comments
Post a Comment