HHH-17508 Fix using union queries as CTE in criteria

This commit is contained in:
Marco Belladelli 2024-02-09 13:08:47 +01:00
parent a0294c31fe
commit 5309d9d63b
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ public class SqmCteTable<T> extends AnonymousTupleType<T> implements JpaCteCrite
String name,
SqmCteStatement<X> cteStatement,
SqmSelectQuery<X> selectStatement) {
final SqmSelectableNode<?>[] sqmSelectableNodes = selectStatement.getQuerySpec()
final SqmSelectableNode<?>[] sqmSelectableNodes = selectStatement.getQueryPart()
.getFirstQuerySpec()
.getSelectClause()
.getSelectionItems()
.toArray( SqmSelectableNode[]::new );