From 691a2d81093662bc81c7415774e1c99e04186ffe Mon Sep 17 00:00:00 2001 From: Gavin King Date: Tue, 5 Mar 2024 17:29:10 +0100 Subject: [PATCH] HHH-17807 fix array-typed query method parameters --- .../java/org/hibernate/processor/annotation/QueryMethod.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/QueryMethod.java b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/QueryMethod.java index eda8a407f6..82796c473c 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/QueryMethod.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/QueryMethod.java @@ -276,7 +276,7 @@ public class QueryMethod extends AbstractQueryMethod { } private String getConstantName() { - String stem = getUpperUnderscoreCaseFromLowerCamelCase(methodName); + final String stem = getUpperUnderscoreCaseFromLowerCamelCase(methodName); if ( paramTypes.isEmpty() ) { return stem; } @@ -285,6 +285,7 @@ public class QueryMethod extends AbstractQueryMethod { + paramTypes.stream() .filter(type -> !isSpecialParam(type)) .map(StringHelper::unqualify) + .map(type -> type.replace("[]", "Array")) .reduce((x,y) -> x + '_' + y) .orElse(""); }