Fix runtime model build error

This commit is contained in:
Andrea Boriero 2020-08-18 09:20:04 +01:00
parent 38753afab6
commit 520cb95fa6
2 changed files with 5 additions and 2 deletions

View File

@ -506,7 +506,9 @@ public abstract class PersistentClass implements AttributeContainer, Serializabl
String root = StringHelper.root( propertyName );
while ( iterator.hasNext() ) {
Property prop = (Property) iterator.next();
if ( prop.getName().equals( root ) ) {
if ( prop.getName().equals( root )
|| (prop instanceof Backref || prop instanceof IndexBackref)
&& prop.getName().equals( propertyName ) ) {
return prop;
}
}

View File

@ -5858,8 +5858,9 @@ public abstract class AbstractEntityPersister
final EntityMetamodel currentEntityMetamodel = this.getEntityMetamodel();
int stateArrayPosition = getStateArrayInitialPosition( creationProcess );
NonIdentifierAttribute[] properties = currentEntityMetamodel.getProperties();
for ( int i = 0; i < currentEntityMetamodel.getPropertySpan(); i++ ) {
final NonIdentifierAttribute runtimeAttrDefinition = currentEntityMetamodel.getProperties()[i];
final NonIdentifierAttribute runtimeAttrDefinition = properties[i];
final Property bootProperty = bootEntityDescriptor.getProperty( runtimeAttrDefinition.getName() );
if ( superMappingType != null && superMappingType.findAttributeMapping( bootProperty.getName() ) != null ) {