HHH-18761 fix generation of named query method in presence of Jakarta Data

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-10-24 14:14:38 +02:00
parent 383d32e3e6
commit c03076885c
1 changed files with 3 additions and 2 deletions

View File

@ -105,10 +105,11 @@ public abstract class AnnotationMeta implements Metamodel {
context.getEntityNameMappings(), context.getEnumTypesByValue() ) context.getEntityNameMappings(), context.getEnumTypesByValue() )
); );
if ( statement instanceof SqmSelectStatement if ( statement instanceof SqmSelectStatement
&& isQueryMethodName( name ) ) { && isQueryMethodName( name )
&& !isJakartaDataStyle() ) {
putMember( name, putMember( name,
// TODO: respect @NamedQuery(resultClass) // TODO: respect @NamedQuery(resultClass)
new NamedQueryMethod( new NamedQueryMethod(
this, this,
(SqmSelectStatement<?>) statement, (SqmSelectStatement<?>) statement,
name.substring(1), name.substring(1),