Commit c866b42
committed
Polishing.
A few further tweaks: ClassTypeInformation now never unwraps the user type to consistently work with the type originally presented in the lookup. That allows us to get rid of the custom equals(…)/hashCode() methods and removes the need to deal with original and user type in the same CTI instance.
The augmented caching of PersistentEntities in AbstractMappingContext now primarily happens in doAddPersistentEntity(…). We still need to implement a cache manipulation for the case that a user type has caused the creation of a PersistentEntity first and we see a lookup for the proxy type later. Before actually processing the TypeInformation we now try to lookup an already existing PersistentEntity for the user type and augment the cache if one was found.
See #2485
Original pull request: #2486.1 parent ac9d116 commit c866b42
File tree
3 files changed
+27
-35
lines changed- src
- main/java/org/springframework/data
- mapping/context
- util
- test/java/org/springframework/data/mapping/context
3 files changed
+27
-35
lines changedLines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | | - | |
| 357 | + | |
359 | 358 | | |
360 | 359 | | |
361 | 360 | | |
362 | 361 | | |
| 362 | + | |
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
| 373 | + | |
375 | 374 | | |
376 | | - | |
377 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
379 | 382 | | |
380 | 383 | | |
381 | 384 | | |
| |||
392 | 395 | | |
393 | 396 | | |
394 | 397 | | |
| 398 | + | |
| 399 | + | |
395 | 400 | | |
396 | 401 | | |
397 | | - | |
| 402 | + | |
398 | 403 | | |
399 | | - | |
| 404 | + | |
400 | 405 | | |
401 | 406 | | |
402 | 407 | | |
403 | | - | |
| 408 | + | |
404 | 409 | | |
405 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
406 | 414 | | |
| 415 | + | |
407 | 416 | | |
| 417 | + | |
408 | 418 | | |
409 | 419 | | |
410 | 420 | | |
| |||
420 | 430 | | |
421 | 431 | | |
422 | 432 | | |
| 433 | + | |
423 | 434 | | |
| 435 | + | |
| 436 | + | |
424 | 437 | | |
| 438 | + | |
425 | 439 | | |
426 | 440 | | |
427 | 441 | | |
| |||
Lines changed: 1 addition & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | | - | |
| 93 | + | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
178 | 177 | | |
179 | 178 | | |
180 | 179 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | 180 | | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
| |||
0 commit comments