diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/function/array/PostgreSQLUnnestFunction.java b/hibernate-core/src/main/java/org/hibernate/dialect/function/array/PostgreSQLUnnestFunction.java index 0b11cda338..bc926434ad 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/function/array/PostgreSQLUnnestFunction.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/function/array/PostgreSQLUnnestFunction.java @@ -57,7 +57,7 @@ public class PostgreSQLUnnestFunction extends UnnestFunction { selectableMapping ) ); } - sqlAppender.append( ' ' ); + sqlAppender.append( " as " ); sqlAppender.append( selectableMapping.getSelectionExpression() ); } ); sqlAppender.appendSql( " from jsonb_array_elements(" );