Skip to content

Commit a298479

Browse files
committed
HHH-19207 - propose solution
1 parent c0dcf76 commit a298479

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java

+9
Original file line numberDiff line numberDiff line change
@@ -8366,6 +8366,15 @@ else if ( getLoadQueryInfluencers().hasEnabledFetchProfiles() ) {
83668366
}
83678367
else {
83688368
tableGroup = compatibleTableGroup;
8369+
8370+
if ( joinProducer instanceof PluralAttributeMapping attributeMapping ) {
8371+
if ( attributeMapping.getOrderByFragment() != null ) {
8372+
applyOrdering( tableGroup, attributeMapping.getOrderByFragment() );
8373+
}
8374+
if ( attributeMapping.getManyToManyOrderByFragment() != null ) {
8375+
applyOrdering( tableGroup, attributeMapping.getManyToManyOrderByFragment() );
8376+
}
8377+
}
83698378
}
83708379

83718380
// and return the joined group

0 commit comments

Comments
 (0)