Skip to content

Commit 4bd1642

Browse files
committed
HHH-18353 ArrayConstructorFunction comparing argument types by reference causes FunctionArgumentException
1 parent ab11020 commit 4bd1642

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hibernate-core/src/main/java/org/hibernate/dialect/function/array/ArrayConstructorFunction.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ public void validateSqlTypes(List<? extends SqlAstNode> arguments, String functi
109109
if ( firstType == null ) {
110110
firstType = argumentType;
111111
}
112-
else if ( firstType != argumentType ) {
112+
else if ( firstType.getSingleJdbcMapping() != argumentType.getSingleJdbcMapping() ) {
113113
throw new FunctionArgumentException(
114114
String.format(
115115
"All array arguments must have a type compatible to the first argument type [%s], but argument %d has type '%s'",
116-
firstType,
116+
firstType.getSingleJdbcMapping(),
117117
i + 1,
118-
argumentType
118+
argumentType.getSingleJdbcMapping()
119119
)
120120
);
121121
}

0 commit comments

Comments
 (0)