Persistent entity type detection now starts with the association target type if available.
This causes us to inspect the most concrete type we can find from a property declaration that might be overridden using an annotation. Closes: #2409 Original Pull Request: #2410
This commit is contained in:
committed by
Christoph Strobl
parent
e565c11dcc
commit
d3cd1ab60a
@@ -436,9 +436,8 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
|
||||
|
||||
private Set<TypeInformation<?>> detectEntityTypes(SimpleTypeHolder simpleTypes) {
|
||||
|
||||
TypeInformation<?> typeToStartWith = ASSOCIATION_TYPE != null && ASSOCIATION_TYPE.isAssignableFrom(rawType)
|
||||
? information.getComponentType()
|
||||
: information;
|
||||
TypeInformation<?> typeToStartWith = getAssociationTargetTypeInformation();
|
||||
typeToStartWith = typeToStartWith == null ? information : typeToStartWith;
|
||||
|
||||
Set<TypeInformation<?>> result = detectEntityTypes(typeToStartWith);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user