From ebd72f8470db3ed2125c3b5576bb003f3a7758c9 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Tue, 5 Mar 2024 20:26:51 +0100 Subject: [PATCH] handle generic-typed parameters of query methods --- .../java/org/hibernate/processor/annotation/QueryMethod.java | 1 + 1 file changed, 1 insertion(+) 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 82796c473c..defc623b68 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 @@ -284,6 +284,7 @@ public class QueryMethod extends AbstractQueryMethod { return stem + "_" + paramTypes.stream() .filter(type -> !isSpecialParam(type)) + .map(type -> type.indexOf('<')>0 ? type.substring(0, type.indexOf('<')) : type) .map(StringHelper::unqualify) .map(type -> type.replace("[]", "Array")) .reduce((x,y) -> x + '_' + y)