Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions app/admin/fiori-service.cds
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ annotate AdminService.GenreHierarchy with @UI: {
PresentationVariant #VH: {
$Type : 'UI.PresentationVariantType',
Visualizations : ['@UI.LineItem'],
RecursiveHierarchyQualifier: 'GenreHierarchy'
RecursiveHierarchyQualifier: 'GenreHierarchyHierarchy'
},
LineItem : [{
$Type: 'UI.DataField',
Expand Down Expand Up @@ -196,19 +196,7 @@ annotate AdminService.Books.texts {
//
// Annotations for hierarchy ContentsHierarchy
//
annotate AdminService.ContentsHierarchy with @Aggregation.RecursiveHierarchy#ContentsHierarchy: {
$Type: 'Aggregation.RecursiveHierarchyType',
NodeProperty: ID, // identifies a node
ParentNavigationProperty: parent // navigates to a node's parent
};

annotate AdminService.ContentsHierarchy with @Hierarchy.RecursiveHierarchy#ContentsHierarchy: {
$Type: 'Hierarchy.RecursiveHierarchyType',
LimitedDescendantCount: LimitedDescendantCount,
DistanceFromRoot: DistanceFromRoot,
DrillState: DrillState,
LimitedRank: LimitedRank
};
annotate AdminService.ContentsHierarchy with @hierarchy;

annotate AdminService.Books actions {
@(
Expand Down
2 changes: 1 addition & 1 deletion app/admin/webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"controlConfiguration": {
"contents/@com.sap.vocabularies.UI.v1.LineItem": {
"tableSettings": {
"hierarchyQualifier": "ContentsHierarchy",
"hierarchyQualifier": "ContentsHierarchyHierarchy",
"type": "TreeTable"
}
}
Expand Down
13 changes: 1 addition & 12 deletions app/browse-genres/fiori-service.cds
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,5 @@
using CatalogService from '../../srv/cat-service';


annotate CatalogService.GenreHierarchy with @Aggregation.RecursiveHierarchy#GenreHierarchy: {
$Type: 'Aggregation.RecursiveHierarchyType',
NodeProperty: ID, // identifies a node
ParentNavigationProperty: parent // navigates to a node's parent
};
annotate CatalogService.GenreHierarchy with @hierarchy;

annotate CatalogService.GenreHierarchy with @Hierarchy.RecursiveHierarchy#GenreHierarchy: {
$Type: 'Hierarchy.RecursiveHierarchyType',
LimitedDescendantCount: LimitedDescendantCount,
DistanceFromRoot: DistanceFromRoot,
DrillState: DrillState,
LimitedRank: LimitedRank
};
2 changes: 1 addition & 1 deletion app/browse-genres/webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"controlConfiguration": {
"@com.sap.vocabularies.UI.v1.LineItem": {
"tableSettings": {
"hierarchyQualifier": "GenreHierarchy",
"hierarchyQualifier": "GenreHierarchyHierarchy",
"type": "TreeTable"
}
}
Expand Down
15 changes: 1 addition & 14 deletions app/genres/fiori-service.cds
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,4 @@
using AdminService from '../../srv/admin-service';


annotate AdminService.GenreHierarchy with @Aggregation.RecursiveHierarchy#GenreHierarchy: {
$Type: 'Aggregation.RecursiveHierarchyType',
NodeProperty: ID, // identifies a node
ParentNavigationProperty: parent // navigates to a node's parent
};

annotate AdminService.GenreHierarchy with @Hierarchy.RecursiveHierarchy#GenreHierarchy: {
$Type: 'Hierarchy.RecursiveHierarchyType',
// ExternalKey : null,
LimitedDescendantCount: LimitedDescendantCount,
DistanceFromRoot: DistanceFromRoot,
DrillState: DrillState,
LimitedRank: LimitedRank
};
annotate AdminService.GenreHierarchy with @hierarchy;
2 changes: 1 addition & 1 deletion app/genres/webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"controlConfiguration": {
"@com.sap.vocabularies.UI.v1.LineItem": {
"tableSettings": {
"hierarchyQualifier": "GenreHierarchy",
"hierarchyQualifier": "GenreHierarchyHierarchy",
"type": "TreeTable"
}
}
Expand Down
5 changes: 2 additions & 3 deletions db/books.cds
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ namespace my.bookshop;
using {Currency, sap, managed, cuid} from '@sap/cds/common';
using my.bookshop.Reviews from './reviews';
using my.bookshop.TechnicalBooleanFlag from './common';
using {my.common.Hierarchy as Hierarchy} from './hierarchy';

@fiori.draft.enabled
entity Books : cuid, managed {
Expand Down Expand Up @@ -46,7 +45,7 @@ annotate Authors with
/**
* Hierarchically organized Code List for Genres
*/
entity Genres : sap.common.CodeList, Hierarchy {
entity Genres : sap.common.CodeList {
key ID : UUID;
// move siblings
siblingRank : Integer;
Expand All @@ -59,7 +58,7 @@ entity Genres : sap.common.CodeList, Hierarchy {
/**
* Hierarchically organized entity for Contents
*/
entity Contents: Hierarchy {
entity Contents {
key ID : UUID;
name : String;
page : Integer;
Expand Down
23 changes: 0 additions & 23 deletions db/hierarchy.cds

This file was deleted.

Loading
Loading