https://hibernate.atlassian.net/browse/HHH-16189 introduced some very conservative conditions that lead to joining join tables more often then necessary. Essentially, we only need an SqmPath to render the target table column if it also appears in the group by clause. We have code in EntityValuedPathInterpretation that already optimizes like that, so it’s a matter of code de-duplication. |