Skip to content

Commit 9f76602

Browse files
committed
review feedback
1 parent 52c99df commit 9f76602

File tree

5 files changed

+14
-53
lines changed

5 files changed

+14
-53
lines changed

db/books.cds

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ using {
88
} from '@sap/cds/common';
99
using my.bookshop.Reviews from './reviews';
1010
using my.bookshop.TechnicalBooleanFlag from './common';
11-
using {sap.attachments.Attachments} from `com.sap.cds/cds-feature-attachments`;
1211

1312
@fiori.draft.enabled
1413
entity Books : cuid, managed {
@@ -23,7 +22,6 @@ entity Books : cuid, managed {
2322
reviews : Association to many Reviews
2423
on reviews.book = $self;
2524
isReviewable : TechnicalBooleanFlag not null default true;
26-
covers : Composition of many Attachments;
2725
}
2826

2927
entity Authors : cuid, managed {

db/pom.xml

Lines changed: 0 additions & 41 deletions
This file was deleted.

pom.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
</properties>
3333

3434
<modules>
35-
<module>db</module>
3635
<module>srv</module>
3736
<module>integration-tests</module>
3837
</modules>
@@ -76,14 +75,6 @@
7675
</dependencies>
7776
</dependencyManagement>
7877

79-
<dependencies>
80-
<dependency>
81-
<groupId>com.sap.cds</groupId>
82-
<artifactId>cds-feature-attachments</artifactId>
83-
<version>${cds-feature-attachments.version}</version>
84-
</dependency>
85-
</dependencies>
86-
8778
<build>
8879
<plugins>
8980
<!-- JAVA VERSION -->

srv/admin-service.cds

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using {sap.common.Languages as CommonLanguages} from '@sap/cds/common';
22
using {my.bookshop as my} from '../db/index';
33
using {sap.changelog as changelog} from 'com.sap.cds/change-tracking';
4+
using {sap.attachments.Attachments} from `com.sap.cds/cds-feature-attachments`;
45

56
extend my.Orders with changelog.changeTracked;
67

@@ -62,4 +63,9 @@ annotate AdminService.Orders with @changelog: [OrderNo];
6263
annotate AdminService.OrderItems with @changelog: [
6364
parent.OrderNo,
6465
book.title,
65-
];
66+
];
67+
68+
// Extends the Books entity with the Attachments composition
69+
extend my.Books with {
70+
covers : Composition of many Attachments;
71+
};

srv/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@
7474
<artifactId>connectivity-apache-httpclient4</artifactId>
7575
</dependency>
7676

77+
<!-- RE-USE PLUGIN DEPENDENCIES -->
78+
<dependency>
79+
<groupId>com.sap.cds</groupId>
80+
<artifactId>cds-feature-attachments</artifactId>
81+
<version>${cds-feature-attachments.version}</version>
82+
</dependency>
83+
7784
<!-- OTHER DEPENDENCIES -->
7885
<dependency>
7986
<groupId>com.h2database</groupId>

0 commit comments

Comments
 (0)