Skip to content

Commit 35a59ed

Browse files
committed
Add dependency to cds-feature-attachments
1 parent 86f3405 commit 35a59ed

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

db/books.cds

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ 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`;
1112

1213
@fiori.draft.enabled
1314
entity Books : cuid, managed {
@@ -22,6 +23,7 @@ entity Books : cuid, managed {
2223
reviews : Association to many Reviews
2324
on reviews.book = $self;
2425
isReviewable : TechnicalBooleanFlag not null default true;
26+
covers : Composition of many Attachments;
2527
}
2628

2729
entity Authors : cuid, managed {

db/pom.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<artifactId>bookshop-parent</artifactId>
9+
<groupId>my</groupId>
10+
<version>${revision}</version>
11+
</parent>
12+
13+
<artifactId>bookshop-db</artifactId>
14+
<packaging>pom</packaging>
15+
16+
<build>
17+
<plugins>
18+
<plugin>
19+
<groupId>com.sap.cds</groupId>
20+
<artifactId>cds-maven-plugin</artifactId>
21+
<executions>
22+
<execution>
23+
<id>cds.clean</id>
24+
<goals>
25+
<goal>clean</goal>
26+
</goals>
27+
</execution>
28+
29+
<execution>
30+
<id>cds.resolve</id>
31+
<goals>
32+
<goal>resolve</goal>
33+
</goals>
34+
</execution>
35+
</executions>
36+
</plugin>
37+
</plugins>
38+
</build>
39+
40+
</project>

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828
<xsuaa.version>3.5.3</xsuaa.version>
2929
<cf-java-logging-support.version>3.8.4</cf-java-logging-support.version>
3030
<cds.cdsdk-version>8.3.0</cds.cdsdk-version>
31+
<cds-feature-attachments.version>1.0.4-SNAPSHOT</cds-feature-attachments.version>
3132
</properties>
3233

3334
<modules>
35+
<module>db</module>
3436
<module>srv</module>
3537
<module>integration-tests</module>
3638
</modules>
@@ -74,6 +76,14 @@
7476
</dependencies>
7577
</dependencyManagement>
7678

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+
7787
<build>
7888
<plugins>
7989
<!-- JAVA VERSION -->
@@ -167,4 +177,15 @@
167177
</plugin>
168178
</plugins>
169179
</build>
180+
181+
<repositories>
182+
<repository>
183+
<id>Artifactory_DMZ-snapshots</id>
184+
<name>SAP's Artifactory</name>
185+
<url>https://common.repositories.cloud.sap/artifactory/cap-java/</url>
186+
<snapshots>
187+
<enabled>true</enabled>
188+
</snapshots>
189+
</repository>
190+
</repositories>
170191
</project>

srv/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,4 +236,5 @@
236236
</plugin>
237237
</plugins>
238238
</build>
239+
239240
</project>

0 commit comments

Comments
 (0)