Skip to content

Commit 69f5dae

Browse files
committed
restore CodeList aspect
1 parent bde2090 commit 69f5dae

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

db/books.cds

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ namespace my.bookshop;
22

33
using {
44
Currency,
5+
sap,
56
managed,
67
cuid
78
} from '@sap/cds/common';
@@ -47,10 +48,8 @@ annotate Authors with
4748
/**
4849
* Hierarchically organized Code List for Genres
4950
*/
50-
entity Genres {
51+
entity Genres : sap.common.CodeList {
5152
key ID : Integer;
52-
name : localized String(255);
53-
descr : localized String(1000);
5453
parent : Association to Genres;
5554
children : Composition of many Genres
5655
on children.parent = $self;

srv/admin-service.cds

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ service AdminService @(requires: 'admin') {
2121
entity Authors as projection on my.Authors;
2222
entity Orders as select from my.Orders;
2323
extend my.Genres with Hierarchy;
24+
@cds.odata.valuelist: false
2425
entity GenreHierarchy as projection on my.Genres;
2526

2627
@cds.persistence.skip

srv/cat-service.cds

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ service CatalogService @(requires: 'any') {
1313
@readonly
1414
entity Authors as projection on my.Authors;
1515

16-
@readonly
17-
entity Genres as projection on my.Genres;
18-
1916
@readonly
2017
entity Reviews as projection on my.Reviews;
2118

srv/review-service.cds

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ service ReviewService {
1515
@readonly
1616
entity Authors as projection on my.Authors;
1717

18-
@readonly
19-
entity Genres as projection on my.Genres;
20-
2118
// access control restrictions
2219
annotate Reviews with @restrict: [
2320
{

0 commit comments

Comments
 (0)