We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8961fbb commit 0922fb1Copy full SHA for 0922fb1
hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java
@@ -8494,6 +8494,16 @@ else if ( getLoadQueryInfluencers().hasEnabledFetchProfiles() ) {
8494
}
8495
else {
8496
tableGroup = compatibleTableGroup;
8497
+
8498
+ if ( joinProducer instanceof PluralAttributeMapping ) {
8499
+ final PluralAttributeMapping attributeMapping = (PluralAttributeMapping) joinProducer;
8500
+ if ( attributeMapping.getOrderByFragment() != null ) {
8501
+ applyOrdering( tableGroup, attributeMapping.getOrderByFragment() );
8502
+ }
8503
+ if ( attributeMapping.getManyToManyOrderByFragment() != null ) {
8504
+ applyOrdering( tableGroup, attributeMapping.getManyToManyOrderByFragment() );
8505
8506
8507
8508
8509
// and return the joined group
0 commit comments