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() )
);
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),