fix a bug in generation of @Find method for @NaturalId fields

StatelessSession does not have a byNaturalId() method
This commit is contained in:
Gavin King 2024-10-03 13:06:51 +02:00
parent fa4c43fc34
commit d5102ff9eb
1 changed files with 22 additions and 19 deletions

View File

@ -1900,6 +1900,7 @@ public class AnnotationMetaEntity extends AnnotationMeta {
); );
break; break;
case NATURAL_ID: case NATURAL_ID:
if ( !usingStatelessSession( sessionType[0] ) ) {// no byNaturalId() lookup API for SS
putMember( methodKey, putMember( methodKey,
new NaturalIdFinderMethod( new NaturalIdFinderMethod(
this, method, this, method,
@ -1919,6 +1920,8 @@ public class AnnotationMetaEntity extends AnnotationMeta {
) )
); );
break; break;
}
// else intentionally fall through
case BASIC: case BASIC:
case MULTIVALUED: case MULTIVALUED:
final List<Boolean> paramPatterns = parameterPatterns( method ); final List<Boolean> paramPatterns = parameterPatterns( method );