Skip to content

Commit 7b6179e

Browse files
committed
Update to 3.5.0 & avoid parent_id/node_id projection
1 parent 357611e commit 7b6179e

File tree

6 files changed

+26
-29
lines changed

6 files changed

+26
-29
lines changed

app/genres/fiori-service.cds

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ using AdminService from '../../srv/admin-service';
77

88
annotate AdminService.GenreHierarchy with @Aggregation.RecursiveHierarchy#GenreHierarchy: {
99
$Type: 'Aggregation.RecursiveHierarchyType',
10-
NodeProperty: node_id, // identifies a node
11-
ParentNavigationProperty: parent // navigates to a node's parent
10+
NodeProperty: ID, // identifies a node
11+
ParentNavigationProperty: parnt // navigates to a node's parent
1212
};
1313

1414
annotate AdminService.GenreHierarchy with @Hierarchy.RecursiveHierarchy#GenreHierarchy: {

db/books.cds

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ annotate Authors with
4747
*/
4848
entity Genres {
4949
key ID : Integer;
50-
node : Integer not null;
51-
parent_node : Integer default 0;
5250
name : localized String(255);
5351
descr : localized String(1000);
54-
parent : Association to one Genres on parent.node = parent_node;
52+
parnt : Association to Genres;
53+
children : Composition of many Genres
54+
on children.parnt = $self;
5555
}

db/data/my.bookshop-Genres.csv

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
ID;parent_node;name;node
2-
10;;Fiction;10
3-
11;10;Drama;11
4-
12;10;Poetry;12
5-
13;10;Fantasy;13
6-
14;10;Science Fiction;14
7-
15;10;Romance;15
8-
16;10;Mystery;16
9-
17;10;Thriller;17
10-
18;10;Dystopia;18
11-
19;10;Fairy Tale;19
12-
20;;Non-Fiction;20
13-
21;20;Biography;21
14-
22;21;Autobiography;22
15-
23;20;Essay;23
16-
24;20;Speech;24
1+
ID;parnt_ID;name
2+
10;;Fiction
3+
11;10;Drama
4+
12;10;Poetry
5+
13;10;Fantasy
6+
14;10;Science Fiction
7+
15;10;Romance
8+
16;10;Mystery
9+
17;10;Thriller
10+
18;10;Dystopia
11+
19;10;Fairy Tale
12+
20;;Non-Fiction
13+
21;20;Biography
14+
22;21;Autobiography
15+
23;20;Essay
16+
24;20;Speech

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323

2424
<!-- DEPENDENCIES VERSION -->
2525
<jdk.version>21</jdk.version>
26-
<cds.services.version>3.4.0</cds.services.version>
26+
<cds.services.version>3.5.0</cds.services.version>
2727
<cloud.sdk.version>5.13.0</cloud.sdk.version>
2828
<xsuaa.version>3.5.3</xsuaa.version>
2929
<cf-java-logging-support.version>3.8.4</cf-java-logging-support.version>
30-
<cds.cdsdk-version>8.4.1</cds.cdsdk-version>
30+
<cds.cdsdk-version>8.5.0</cds.cdsdk-version>
3131
</properties>
3232

3333
<modules>

srv/admin-service.cds

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ service AdminService @(requires : 'admin') {
1616
entity Orders as select from my.Orders;
1717
extend my.Genres with Hierarchy;
1818

19-
entity GenreHierarchy as projection on my.Genres {
20-
node as node_id,
21-
parent_node as parent_id,
22-
*
23-
} excluding { node, parent_node }
19+
entity GenreHierarchy as projection on my.Genres;
2420

2521
@cds.persistence.skip
2622
entity Upload @odata.singleton {

srv/src/main/resources/application.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
logging:
33
level:
4-
'[com.sap.cds.auditlog]': DEBUG
4+
com.sap.cds.auditlog: DEBUG
5+
com.sap.cds.persistence.sql: DEBUG
56
spring:
67
jmx:
78
enabled: true

0 commit comments

Comments
 (0)