We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0d7438 commit 67fbc97Copy full SHA for 67fbc97
hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmUtil.java
@@ -254,7 +254,7 @@ public static boolean isFkOptimizationAllowed(SqmPath<?> sqmPath) {
254
* or one that has an explicit on clause predicate.
255
*/
256
public static boolean isFkOptimizationAllowed(SqmPath<?> sqmPath, EntityAssociationMapping associationMapping) {
257
- if ( sqmPath instanceof SqmJoin<?, ?> ) {
+ if ( associationMapping.isFkOptimizationAllowed() && sqmPath instanceof SqmJoin<?, ?> ) {
258
final SqmJoin<?, ?> sqmJoin = (SqmJoin<?, ?>) sqmPath;
259
switch ( sqmJoin.getSqmJoinType() ) {
260
case LEFT:
0 commit comments