fix a bug in generation of @Find method for @NaturalId fields
StatelessSession does not have a byNaturalId() method
This commit is contained in:
parent
fa4c43fc34
commit
d5102ff9eb
|
@ -1900,25 +1900,28 @@ public class AnnotationMetaEntity extends AnnotationMeta {
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case NATURAL_ID:
|
case NATURAL_ID:
|
||||||
putMember( methodKey,
|
if ( !usingStatelessSession( sessionType[0] ) ) {// no byNaturalId() lookup API for SS
|
||||||
new NaturalIdFinderMethod(
|
putMember( methodKey,
|
||||||
this, method,
|
new NaturalIdFinderMethod(
|
||||||
methodName,
|
this, method,
|
||||||
returnType.toString(),
|
methodName,
|
||||||
containerType,
|
returnType.toString(),
|
||||||
paramNames,
|
containerType,
|
||||||
paramTypes,
|
paramNames,
|
||||||
parameterNullability(method, entity),
|
paramTypes,
|
||||||
repository,
|
parameterNullability(method, entity),
|
||||||
sessionType[0],
|
repository,
|
||||||
sessionType[1],
|
sessionType[0],
|
||||||
profiles,
|
sessionType[1],
|
||||||
context.addNonnullAnnotation(),
|
profiles,
|
||||||
jakartaDataRepository,
|
context.addNonnullAnnotation(),
|
||||||
fullReturnType(method)
|
jakartaDataRepository,
|
||||||
)
|
fullReturnType(method)
|
||||||
);
|
)
|
||||||
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 );
|
||||||
|
|
Loading…
Reference in New Issue