BaseSqmToSqlAstConverter#consumeEntityJoin() postpone tableGroupJoin.applyPredicate after consuming implicit joins

This commit is contained in:
Andrea Boriero 2021-03-10 14:36:38 +01:00 committed by Christian Beikov
parent 1905e8bba3
commit 15b52460f3
1 changed files with 3 additions and 2 deletions

View File

@ -1841,6 +1841,9 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
);
lhsTableGroup.addTableGroupJoin( tableGroupJoin );
consumeExplicitJoins( sqmJoin, tableGroupJoin.getJoinedGroup() );
consumeImplicitJoins( sqmJoin, tableGroupJoin.getJoinedGroup() );
// add any additional join restrictions
if ( sqmJoin.getJoinPredicate() != null ) {
tableGroupJoin.applyPredicate(
@ -1848,8 +1851,6 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
);
}
consumeExplicitJoins( sqmJoin, tableGroupJoin.getJoinedGroup() );
consumeImplicitJoins( sqmJoin, tableGroupJoin.getJoinedGroup() );
}
private void consumeImplicitJoins(SqmPath<?> sqmPath, TableGroup tableGroup) {