Commit 508791b
Capture execution results for update db actions to fix root references with immutably typed ids.
+ Added #getIdValueSource to DbAction.WithEntity since it now applies to all such DbAction.
+ Removed DbAction.WithGeneratedId in favor of DbAction.WithEntity where it was used.
Removes unused DbAction.Update.
Passes the root from BeforeSaveCallback through to InsertRoot,UpdateRoot
actions.
+ Isolate aggregate change #getEntity #setEntity behaviors into a new
interface for "save" changes.
+ Extract #setEntity from DbAction.WithEntity to a new DbAction interface
just for root actions.
+ JdbcAggregateChangeExecutionContext#populateIdsIfNecessary returns the root entity
from DbAction.InsertRoot or DbAction.UpdateRoot regardless of the immutability of
its @id property.
Closes #1199
Closes #1201
Original pull request #12081 parent 0500442 commit 508791b
File tree
28 files changed
+772
-404
lines changed- spring-data-jdbc/src
- main/java/org/springframework/data/jdbc/core
- test
- java/org/springframework/data/jdbc
- core
- repository
- resources
- org.springframework.data.jdbc.core
- org.springframework.data.jdbc.repository
- org/springframework/data/jdbc/mybatis
- mapper
- spring-data-relational/src
- main/java/org/springframework/data/relational/core/conversion
- test/java/org/springframework/data/relational/core/conversion
28 files changed
+772
-404
lines changedLines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 52 | + | |
| 53 | + | |
57 | 54 | | |
58 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
73 | | - | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
Lines changed: 26 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 18 | + | |
27 | 19 | | |
28 | 20 | | |
29 | 21 | | |
| |||
40 | 32 | | |
41 | 33 | | |
42 | 34 | | |
| 35 | + | |
43 | 36 | | |
44 | 37 | | |
45 | 38 | | |
| |||
108 | 101 | | |
109 | 102 | | |
110 | 103 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 104 | + | |
120 | 105 | | |
121 | 106 | | |
122 | 107 | | |
| |||
203 | 188 | | |
204 | 189 | | |
205 | 190 | | |
206 | | - | |
| 191 | + | |
207 | 192 | | |
208 | | - | |
209 | 193 | | |
210 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
211 | 197 | | |
212 | 198 | | |
213 | 199 | | |
| |||
227 | 213 | | |
228 | 214 | | |
229 | 215 | | |
230 | | - | |
231 | | - | |
232 | 216 | | |
233 | 217 | | |
234 | | - | |
235 | | - | |
236 | 218 | | |
237 | 219 | | |
238 | 220 | | |
| |||
241 | 223 | | |
242 | 224 | | |
243 | 225 | | |
244 | | - | |
| 226 | + | |
245 | 227 | | |
246 | | - | |
247 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
248 | 233 | | |
249 | 234 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 235 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 236 | + | |
| 237 | + | |
260 | 238 | | |
261 | | - | |
262 | | - | |
| 239 | + | |
263 | 240 | | |
264 | | - | |
265 | | - | |
266 | | - | |
| 241 | + | |
| 242 | + | |
267 | 243 | | |
268 | 244 | | |
269 | 245 | | |
270 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
271 | 249 | | |
272 | 250 | | |
273 | 251 | | |
| |||
279 | 257 | | |
280 | 258 | | |
281 | 259 | | |
282 | | - | |
| 260 | + | |
283 | 261 | | |
284 | 262 | | |
285 | 263 | | |
| |||
301 | 279 | | |
302 | 280 | | |
303 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
304 | 286 | | |
305 | 287 | | |
306 | 288 | | |
| |||
Lines changed: 14 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
65 | | - | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | | - | |
96 | | - | |
97 | 94 | | |
98 | 95 | | |
99 | 96 | | |
| |||
122 | 119 | | |
123 | 120 | | |
124 | 121 | | |
125 | | - | |
126 | | - | |
127 | 122 | | |
128 | 123 | | |
129 | 124 | | |
| |||
146 | 141 | | |
147 | 142 | | |
148 | 143 | | |
149 | | - | |
| 144 | + | |
150 | 145 | | |
151 | 146 | | |
152 | 147 | | |
| |||
286 | 281 | | |
287 | 282 | | |
288 | 283 | | |
289 | | - | |
| 284 | + | |
290 | 285 | | |
291 | 286 | | |
292 | 287 | | |
293 | 288 | | |
294 | 289 | | |
295 | 290 | | |
296 | | - | |
| 291 | + | |
297 | 292 | | |
298 | | - | |
| 293 | + | |
299 | 294 | | |
300 | | - | |
| 295 | + | |
301 | 296 | | |
302 | 297 | | |
303 | 298 | | |
| |||
313 | 308 | | |
314 | 309 | | |
315 | 310 | | |
316 | | - | |
317 | 311 | | |
318 | 312 | | |
319 | 313 | | |
320 | 314 | | |
321 | 315 | | |
322 | 316 | | |
323 | | - | |
| 317 | + | |
324 | 318 | | |
325 | | - | |
326 | | - | |
| 319 | + | |
| 320 | + | |
327 | 321 | | |
328 | 322 | | |
329 | 323 | | |
330 | | - | |
| 324 | + | |
331 | 325 | | |
332 | | - | |
| 326 | + | |
333 | 327 | | |
334 | | - | |
| 328 | + | |
335 | 329 | | |
336 | 330 | | |
337 | 331 | | |
| |||
383 | 377 | | |
384 | 378 | | |
385 | 379 | | |
386 | | - | |
| 380 | + | |
387 | 381 | | |
388 | 382 | | |
389 | 383 | | |
390 | 384 | | |
391 | 385 | | |
392 | 386 | | |
393 | | - | |
| 387 | + | |
394 | 388 | | |
395 | 389 | | |
396 | 390 | | |
| |||
0 commit comments