HHH-15433 Fix a potentiatl index out of bounds exception

This commit is contained in:
Christian Beikov 2022-08-04 09:51:57 +02:00
parent 2f176f79bc
commit a69912dd9c
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ public abstract class SqmQueryPart<T> implements SqmVisitableNode, JpaQueryPart<
public abstract void validateQueryStructureAndFetchOwners();
public void appendHqlString(StringBuilder sb) {
if ( orderByClause == null ) {
if ( orderByClause == null || orderByClause.getSortSpecifications().isEmpty() ) {
return;
}
sb.append( " order by " );