Skip to content

Commit

Permalink
HHH-17415 Improved check for entity valued path expansion in subqueries
Browse files Browse the repository at this point in the history
  • Loading branch information
mbladel committed Nov 14, 2023
1 parent bc7746a commit b455277
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private static boolean selectionContains(Selection<?> selection, NavigablePath p
final SqmPath<?> sqmPath = (SqmPath<?>) selection;
// Expansion is needed if the table group is null, i.e. we're in a top level query where EVPs are always
// expanded to all columns, or if the selection is on the same table (lhs) as the group by expression ...
return ( tableGroupPath == null || sqmPath.getLhs().getNavigablePath().equals( tableGroupPath ) )
return ( tableGroupPath == null || sqmPath.getLhs() != null && sqmPath.getLhs().getNavigablePath().equals( tableGroupPath ) )
// ... and if the entity valued path is selected or any of its columns are
&& path.isParentOrEqual( sqmPath.getNavigablePath() );
}
Expand Down

0 comments on commit b455277

Please sign in to comment.