Commit 480f9cc
committed
Fix PersistentEntity lookup in AbstractMappingContext.hasPersistentEntity(…)
Looking up a PersistentEntity via ….getPersistentEntity(…) applies some massaging of the given type as it could be a proxy type created for a user type. That wrangling was not applied in ….hasPersistentEntity(…) which resulted in a call to that method with a proxy type yielding false although it shouldn't if we already have a PersistentEntity available for the corresponding user type.
We now explicitly lookup the entity by original type and, if it's not the user type itself, try to look up the entity for the latter.
Fixes #2589.1 parent 3d2df96 commit 480f9cc
File tree
2 files changed
+32
-6
lines changed- src
- main/java/org/springframework/data/mapping/context
- test/java/org/springframework/data/mapping/context
2 files changed
+32
-6
lines changedLines changed: 31 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
224 | 249 | | |
225 | 250 | | |
226 | 251 | | |
| |||
760 | 785 | | |
761 | 786 | | |
762 | 787 | | |
763 | | - | |
| 788 | + | |
| 789 | + | |
764 | 790 | | |
765 | 791 | | |
766 | 792 | | |
| |||
778 | 804 | | |
779 | 805 | | |
780 | 806 | | |
781 | | - | |
| 807 | + | |
782 | 808 | | |
783 | 809 | | |
784 | 810 | | |
785 | | - | |
| 811 | + | |
786 | 812 | | |
787 | 813 | | |
788 | 814 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| |||
0 commit comments