diff --git a/advanced/odata.md b/advanced/odata.md index 65e776a77..8c5a45491 100644 --- a/advanced/odata.md +++ b/advanced/odata.md @@ -217,22 +217,25 @@ OData defines a strict two-fold key structure composed of `@.` ```cds @Common.Label: 'Customer' -@Common.ValueList: { - Label: 'Customers', - CollectionPath: 'Customers' +@UI.HeaderInfo: { + TypeName : 'Customer', + TypeNamePlural : 'Customers', + Title : { Value : name } } -entity Customers { } +entity Customers { /* ... */ } ``` This is represented in CSN as follows: -```json +```jsonc {"definitions":{ "Customers":{ "kind": "entity", "@Common.Label": "Customer", - "@Common.ValueList.Label": "Customers", - "@Common.ValueList.CollectionPath": "Customers" + "@UI.HeaderInfo.TypeName": "Customer", + "@UI.HeaderInfo.TypeNamePlural": "Customers", + "@UI.HeaderInfo.Title.Value": {"=": "name"}, + /* ... */ } }} ``` @@ -242,17 +245,23 @@ And would render to EDMX as follows: ```xml - - - - + + + + + + + + + ``` ::: tip -The value for `@Common.ValueList` is flattened to individual key-value pairs in CSN and 'restructured' to a record for OData exposure in EDMX. +The value for `@UI.HeaderInfo` is flattened to individual key-value pairs in CSN and 'restructured' +to a record for OData exposure in EDMX. ::: For each annotated target definition in CSN, the rules for restructuring from CSN sources are: