[HHH-16122] Fix determining the type of a property during type variable resolving for mapped superclasses
This commit is contained in:
parent
a7448bb15a
commit
2271e18ba5
|
@ -269,7 +269,7 @@ public class ClassPropertyHolder extends AbstractPropertyHolder {
|
|||
final Value originalValue = prop.getValue();
|
||||
if ( originalValue instanceof SimpleValue ) {
|
||||
// Avoid copying when the property doesn't depend on a type variable
|
||||
if ( inferredData.getTypeName().equals( getTypeName( originalValue ) ) ) {
|
||||
if ( inferredData.getTypeName().equals( getTypeName( prop ) ) ) {
|
||||
superclass.addDeclaredProperty( prop );
|
||||
return;
|
||||
}
|
||||
|
@ -329,6 +329,11 @@ public class ClassPropertyHolder extends AbstractPropertyHolder {
|
|||
}
|
||||
}
|
||||
|
||||
static String getTypeName(Property property) {
|
||||
final String typeName = getTypeName( property.getValue() );
|
||||
return typeName != null ? typeName : property.getReturnedClassName();
|
||||
}
|
||||
|
||||
static String getTypeName(Value value) {
|
||||
if ( value instanceof Component ) {
|
||||
final Component component = (Component) value;
|
||||
|
|
|
@ -365,7 +365,7 @@ public class PropertyBinder {
|
|||
final Value originalValue = prop.getValue();
|
||||
if ( originalValue instanceof SimpleValue ) {
|
||||
// Avoid copying when the property doesn't depend on a type variable
|
||||
if ( inferredData.getTypeName().equals( ClassPropertyHolder.getTypeName( originalValue ) ) ) {
|
||||
if ( inferredData.getTypeName().equals( ClassPropertyHolder.getTypeName( prop ) ) ) {
|
||||
superclass.setDeclaredIdentifierProperty( prop );
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue