Skip to content

Commit

Permalink
Restore CodeList (#419)
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Becker <[email protected]>
  • Loading branch information
agoerler and beckermarc authored Dec 19, 2024
1 parent bde2090 commit aa690f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions db/books.cds
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ namespace my.bookshop;

using {
Currency,
sap,
managed,
cuid
} from '@sap/cds/common';
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions srv/cat-service.cds
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions srv/review-service.cds
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
{
Expand Down

0 comments on commit aa690f6

Please sign in to comment.