HHH-9114 - Fix property not found when IdClass properties are mapped both in entity and mapped superclass types.
This commit is contained in:
parent
959e3867d1
commit
761ea6c941
|
@ -2627,10 +2627,15 @@ public final class AnnotationBinder {
|
|||
baseClassElements = new ArrayList<PropertyData>();
|
||||
baseReturnedClassOrElement = baseInferredData.getClassOrElement();
|
||||
bindTypeDefs( baseReturnedClassOrElement, buildingContext );
|
||||
PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, xClassProcessed, propertyAccessor );
|
||||
addElementsOfClass( baseClassElements, propContainer, buildingContext );
|
||||
for ( PropertyData element : baseClassElements ) {
|
||||
orderedBaseClassElements.put( element.getPropertyName(), element );
|
||||
// iterate from base returned class up hierarchy to handle cases where the @Id attributes
|
||||
// might be spread across the subclasses and super classes.
|
||||
while ( !Object.class.getName().equals( baseReturnedClassOrElement.getName() ) ) {
|
||||
PropertyContainer propContainer = new PropertyContainer( baseReturnedClassOrElement, xClassProcessed, propertyAccessor );
|
||||
addElementsOfClass( baseClassElements, propContainer, buildingContext );
|
||||
for ( PropertyData element : baseClassElements ) {
|
||||
orderedBaseClassElements.put( element.getPropertyName(), element );
|
||||
}
|
||||
baseReturnedClassOrElement = baseReturnedClassOrElement.getSuperclass();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue