HHH-17711 Fix table reference join resolution for joined subtype

This commit is contained in:
Marco Belladelli 2024-02-06 13:04:33 +01:00
parent d49ad70ad2
commit 037336ea83
2 changed files with 3 additions and 12 deletions

View File

@ -279,6 +279,7 @@ public class BasicFormatterImpl implements Formatter {
private void endCase() {
afterBeginBeforeEnd = false;
decrementIndent();
decrementIndent();
logical();
}

View File

@ -1286,17 +1286,7 @@ public abstract class AbstractEntityPersister
@Override
public boolean containsTableReference(String tableExpression) {
if ( getTableName().equals( tableExpression ) ) {
return true;
}
else {
for ( int i = 0; i < getSubclassTableSpan(); i++ ) {
if ( getSubclassTableName( i ).equals( tableExpression ) ) {
return true;
}
}
return false;
}
return contains( getSubclassTableNames(), tableExpression );
}
@Override
@ -3070,7 +3060,7 @@ public abstract class AbstractEntityPersister
rootTableReference,
true,
sqlAliasBase,
(tableExpression) -> contains( getSubclassTableNames(), tableExpression ),
(tableExpression) -> getRootEntityDescriptor().containsTableReference( tableExpression ),
(tableExpression, tg) -> {
final String[] subclassTableNames = getSubclassTableNames();
for ( int i = 0; i < subclassTableNames.length; i++ ) {