From c03076885cfaa943808564e45942a6e206217382 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Thu, 24 Oct 2024 14:14:38 +0200 Subject: [PATCH] HHH-18761 fix generation of named query method in presence of Jakarta Data Signed-off-by: Gavin King --- .../org/hibernate/processor/annotation/AnnotationMeta.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMeta.java b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMeta.java index e053a1834f..8a54dec99c 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMeta.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMeta.java @@ -105,10 +105,11 @@ public abstract class AnnotationMeta implements Metamodel { context.getEntityNameMappings(), context.getEnumTypesByValue() ) ); if ( statement instanceof SqmSelectStatement - && isQueryMethodName( name ) ) { + && isQueryMethodName( name ) + && !isJakartaDataStyle() ) { putMember( name, // TODO: respect @NamedQuery(resultClass) - new NamedQueryMethod( + new NamedQueryMethod( this, (SqmSelectStatement) statement, name.substring(1),