Skip to content

Commit 183e8af

Browse files
committed
Add tutorial using composite Id with Data REST
1 parent 360a57e commit 183e8af

25 files changed

Lines changed: 1370 additions & 0 deletions

README.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ All tutorials are documented in AsciiDoc format and published as an https://anto
5555
|link:data-mongodb-full-text-search[Spring Data MongoDB: Full Text Search] |Implement link:https://docs.mongodb.com/manual/text-search/[MongoDB Full Text Search] with Spring Data MongoDB
5656
|link:data-mongodb-transactional[Spring Data MongoDB: Transactional] |Enable `@Transactional` support for Spring Data MongoDB
5757
|link:data-repository-definition[Spring Data: Repository Definition] |Implement custom repository interfaces with `@RepositoryDefinition` annotation
58+
|link:data-rest-composite-id[Spring Data REST with Composite ID] |Implementing and exposing entities with composite IDs through Spring Data REST
5859
|link:data-rest-validation[Spring Data REST: Validation] |Perform validation with Spring Data REST
5960
|link:graphql[Spring GraphQL Server] |Implement GraphQL server with Spring GraphQL Server
6061
|link:jooq[jOOQ] | Implement an alternative to Jpa using https://www.jooq.org/[jOOQ] and Gradle
Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
databaseChangeLog:
2+
- changeSet:
3+
id: '1748148271572'
4+
author: Spring Data Relational
5+
objectQuotingStrategy: LEGACY
6+
changes:
7+
- createTable:
8+
columns:
9+
- column:
10+
autoIncrement: true
11+
constraints:
12+
nullable: true
13+
primaryKey: true
14+
name: id
15+
type: BIGINT
16+
- column:
17+
constraints:
18+
nullable: true
19+
name: name
20+
type: VARCHAR(255 BYTE)
21+
- column:
22+
constraints:
23+
nullable: false
24+
name: book
25+
type: BIGINT
26+
tableName: author
27+
- createTable:
28+
columns:
29+
- column:
30+
autoIncrement: true
31+
constraints:
32+
nullable: true
33+
primaryKey: true
34+
name: isbn
35+
type: BIGINT
36+
- column:
37+
constraints:
38+
nullable: true
39+
name: title
40+
type: VARCHAR(255 BYTE)
41+
tableName: book
42+
- addForeignKeyConstraint:
43+
baseColumnNames: book
44+
baseTableName: author
45+
constraintName: book_isbn_fk
46+
referencedColumnNames: isbn
47+
referencedTableName: book
48+
- changeSet:
49+
id: '1748149478922'
50+
author: Spring Data Relational
51+
objectQuotingStrategy: LEGACY
52+
changes:
53+
- createTable:
54+
columns:
55+
- column:
56+
autoIncrement: true
57+
constraints:
58+
nullable: true
59+
primaryKey: true
60+
name: id
61+
type: BIGINT
62+
- column:
63+
constraints:
64+
nullable: true
65+
name: name
66+
type: VARCHAR(255 BYTE)
67+
- column:
68+
constraints:
69+
nullable: false
70+
name: book
71+
type: BIGINT
72+
tableName: author
73+
- createTable:
74+
columns:
75+
- column:
76+
autoIncrement: true
77+
constraints:
78+
nullable: true
79+
primaryKey: true
80+
name: isbn
81+
type: BIGINT
82+
- column:
83+
constraints:
84+
nullable: true
85+
name: title
86+
type: VARCHAR(255 BYTE)
87+
tableName: book
88+
- addForeignKeyConstraint:
89+
baseColumnNames: book
90+
baseTableName: author
91+
constraintName: book_isbn_fk
92+
referencedColumnNames: isbn
93+
referencedTableName: book
94+
- changeSet:
95+
id: '1748153682287'
96+
author: Spring Data Relational
97+
objectQuotingStrategy: LEGACY
98+
changes:
99+
- createTable:
100+
columns:
101+
- column:
102+
autoIncrement: true
103+
constraints:
104+
nullable: true
105+
primaryKey: true
106+
name: isbn
107+
type: BIGINT
108+
- column:
109+
constraints:
110+
nullable: true
111+
name: title
112+
type: VARCHAR(255 BYTE)
113+
tableName: book
114+
- createTable:
115+
columns:
116+
- column:
117+
autoIncrement: true
118+
constraints:
119+
nullable: true
120+
primaryKey: true
121+
name: id
122+
type: BIGINT
123+
- column:
124+
constraints:
125+
nullable: true
126+
name: name
127+
type: VARCHAR(255 BYTE)
128+
- column:
129+
constraints:
130+
nullable: false
131+
name: book
132+
type: BIGINT
133+
tableName: author
134+
- addForeignKeyConstraint:
135+
baseColumnNames: book
136+
baseTableName: author
137+
constraintName: book_isbn_fk
138+
referencedColumnNames: isbn
139+
referencedTableName: book
140+
- changeSet:
141+
id: '1748171516774'
142+
author: Spring Data Relational
143+
objectQuotingStrategy: LEGACY
144+
changes:
145+
- createTable:
146+
columns:
147+
- column:
148+
autoIncrement: true
149+
constraints:
150+
nullable: true
151+
primaryKey: true
152+
name: isbn
153+
type: BIGINT
154+
- column:
155+
constraints:
156+
nullable: true
157+
name: title
158+
type: VARCHAR(255 BYTE)
159+
tableName: book
160+
- createTable:
161+
columns:
162+
- column:
163+
autoIncrement: true
164+
constraints:
165+
nullable: true
166+
primaryKey: true
167+
name: id
168+
type: BIGINT
169+
- column:
170+
constraints:
171+
nullable: true
172+
name: name
173+
type: VARCHAR(255 BYTE)
174+
- column:
175+
constraints:
176+
nullable: false
177+
name: book
178+
type: BIGINT
179+
tableName: author
180+
- addForeignKeyConstraint:
181+
baseColumnNames: book
182+
baseTableName: author
183+
constraintName: book_isbn_fk
184+
referencedColumnNames: isbn
185+
referencedTableName: book
186+
- changeSet:
187+
id: '1748171956993'
188+
author: Spring Data Relational
189+
objectQuotingStrategy: LEGACY
190+
changes:
191+
- createTable:
192+
columns:
193+
- column:
194+
autoIncrement: true
195+
constraints:
196+
nullable: true
197+
primaryKey: true
198+
name: isbn
199+
type: BIGINT
200+
- column:
201+
constraints:
202+
nullable: true
203+
name: title
204+
type: VARCHAR(255 BYTE)
205+
tableName: book
206+
- createTable:
207+
columns:
208+
- column:
209+
autoIncrement: true
210+
constraints:
211+
nullable: true
212+
primaryKey: true
213+
name: id
214+
type: BIGINT
215+
- column:
216+
constraints:
217+
nullable: true
218+
name: name
219+
type: VARCHAR(255 BYTE)
220+
- column:
221+
constraints:
222+
nullable: false
223+
name: book
224+
type: BIGINT
225+
tableName: author
226+
- addForeignKeyConstraint:
227+
baseColumnNames: book
228+
baseTableName: author
229+
constraintName: book_isbn_fk
230+
referencedColumnNames: isbn
231+
referencedTableName: book
232+
- changeSet:
233+
id: '1748172435101'
234+
author: Spring Data Relational
235+
objectQuotingStrategy: LEGACY
236+
changes:
237+
- createTable:
238+
columns:
239+
- column:
240+
autoIncrement: true
241+
constraints:
242+
nullable: true
243+
primaryKey: true
244+
name: id
245+
type: BIGINT
246+
- column:
247+
constraints:
248+
nullable: true
249+
name: name
250+
type: VARCHAR(255 BYTE)
251+
- column:
252+
constraints:
253+
nullable: false
254+
name: book
255+
type: BIGINT
256+
tableName: author
257+
- createTable:
258+
columns:
259+
- column:
260+
autoIncrement: true
261+
constraints:
262+
nullable: true
263+
primaryKey: true
264+
name: isbn
265+
type: BIGINT
266+
- column:
267+
constraints:
268+
nullable: true
269+
name: title
270+
type: VARCHAR(255 BYTE)
271+
tableName: book
272+
- addForeignKeyConstraint:
273+
baseColumnNames: book
274+
baseTableName: author
275+
constraintName: book_isbn_fk
276+
referencedColumnNames: isbn
277+
referencedTableName: book
278+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/gradlew text eol=lf
2+
*.bat text eol=crlf
3+
*.jar binary

data-rest-composite-id/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
HELP.md
2+
.gradle
3+
build/
4+
!gradle/wrapper/gradle-wrapper.jar
5+
!**/src/main/**/build/
6+
!**/src/test/**/build/
7+
8+
### STS ###
9+
.apt_generated
10+
.classpath
11+
.factorypath
12+
.project
13+
.settings
14+
.springBeans
15+
.sts4-cache
16+
bin/
17+
!**/src/main/**/bin/
18+
!**/src/test/**/bin/
19+
20+
### IntelliJ IDEA ###
21+
.idea
22+
*.iws
23+
*.iml
24+
*.ipr
25+
out/
26+
!**/src/main/**/out/
27+
!**/src/test/**/out/
28+
29+
### NetBeans ###
30+
/nbproject/private/
31+
/nbbuild/
32+
/dist/
33+
/nbdist/
34+
/.nb-gradle/
35+
36+
### VS Code ###
37+
.vscode/

0 commit comments

Comments
 (0)