From b843f29af55259f7aa6e521231a5ed708f2a4706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20G=C3=B6rler?= Date: Thu, 19 Dec 2024 11:08:26 +0100 Subject: [PATCH 1/2] review feedback --- README.md | 4 ++-- db/books.cds | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d59b0bb6..b652330c 100644 --- a/README.md +++ b/README.md @@ -143,10 +143,10 @@ are defined for local development: ### Testing in hybrid mode -You can test the `GenreHierarchyTest` on H2 using the profile `default` as well as on HANA using the profile `hybrid` +You can test the `GenreHierarchyTest` on H2 using the profile `default` as well as on HANA using the profile `cloud` ``` -cds bind --exec -- mvn clean install -Dspring.profiles.active=hybrid +cds bind --exec -- mvn clean install -Dspring.profiles.active=cloud ``` ## Using VS Code diff --git a/db/books.cds b/db/books.cds index 1fd06ae9..e7aa3928 100644 --- a/db/books.cds +++ b/db/books.cds @@ -2,6 +2,7 @@ namespace my.bookshop; using { Currency, + sap, managed, cuid } from '@sap/cds/common'; @@ -47,10 +48,8 @@ annotate Authors with /** * Hierarchically organized Code List for Genres */ -entity Genres { +entity Genres : sap.common.CodeList { key ID : Integer; - name : localized String(255); - descr : localized String(1000); parent : Association to Genres; children : Composition of many Genres on children.parent = $self; From e7334680ee30a878eca76c9abc5f3ad6f42863ea Mon Sep 17 00:00:00 2001 From: Marc Becker Date: Thu, 19 Dec 2024 12:01:58 +0100 Subject: [PATCH 2/2] Rely on auto exposure --- srv/cat-service.cds | 3 --- srv/review-service.cds | 3 --- 2 files changed, 6 deletions(-) diff --git a/srv/cat-service.cds b/srv/cat-service.cds index c83eb432..e887271f 100644 --- a/srv/cat-service.cds +++ b/srv/cat-service.cds @@ -13,9 +13,6 @@ service CatalogService @(requires: 'any') { @readonly entity Authors as projection on my.Authors; - @readonly - entity Genres as projection on my.Genres; - @readonly entity Reviews as projection on my.Reviews; diff --git a/srv/review-service.cds b/srv/review-service.cds index 0afa2e92..9ef98df7 100644 --- a/srv/review-service.cds +++ b/srv/review-service.cds @@ -15,9 +15,6 @@ service ReviewService { @readonly entity Authors as projection on my.Authors; - @readonly - entity Genres as projection on my.Genres; - // access control restrictions annotate Reviews with @restrict: [ {