We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0dcf76 commit a298479Copy full SHA for a298479
hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java
@@ -8366,6 +8366,15 @@ else if ( getLoadQueryInfluencers().hasEnabledFetchProfiles() ) {
8366
}
8367
else {
8368
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
8378
8379
8380
// and return the joined group
0 commit comments