Hierarchy v2 sample
Including - CDS OData V2 Adapter Proxy - OData V2 - Fiori Elements V2 - SAPUI5 - List Report (type `TreeTable`) - `@sap.hierarchy` annotations
This commit is contained in:
committed by
Christian Georgi
parent
e44d62ac49
commit
bf2b12e4e8
21
fiori/app/genres/fiori-service.cds
Normal file
21
fiori/app/genres/fiori-service.cds
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace sap.capire.bookshop;
|
||||
|
||||
using { sap.capire.bookshop } from '@capire/bookstore/srv/mashup';
|
||||
|
||||
entity GenreHierarchy : bookshop.Genres {
|
||||
hierarchyLevel : Integer default 0;
|
||||
drillState : String default 'leaf';
|
||||
parent : Association to GenreHierarchy;
|
||||
children : Composition of many GenreHierarchy on children.parent = $self;
|
||||
}
|
||||
|
||||
annotate bookshop.GenreHierarchy {
|
||||
ID @sap.hierarchy.node.for;
|
||||
parent @sap.hierarchy.parent.node.for;
|
||||
hierarchyLevel @sap.hierarchy.level.for;
|
||||
drillState @sap.hierarchy.drill.state.for;
|
||||
}
|
||||
|
||||
extend service CatalogService with {
|
||||
@readonly entity GenreHierarchy as projection on bookshop.GenreHierarchy;
|
||||
}
|
||||
Reference in New Issue
Block a user