File tree Expand file tree Collapse file tree 1 file changed +22
-19
lines changed
tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation Expand file tree Collapse file tree 1 file changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -1921,25 +1921,28 @@ private void createSingleParameterFinder(
1921
1921
);
1922
1922
break ;
1923
1923
case NATURAL_ID :
1924
- putMember ( methodKey ,
1925
- new NaturalIdFinderMethod (
1926
- this , method ,
1927
- methodName ,
1928
- returnType .toString (),
1929
- containerType ,
1930
- paramNames ,
1931
- paramTypes ,
1932
- parameterNullability (method , entity ),
1933
- repository ,
1934
- sessionType [0 ],
1935
- sessionType [1 ],
1936
- profiles ,
1937
- context .addNonnullAnnotation (),
1938
- jakartaDataRepository ,
1939
- fullReturnType (method )
1940
- )
1941
- );
1942
- break ;
1924
+ if ( !usingStatelessSession ( sessionType [0 ] ) ) {// no byNaturalId() lookup API for SS
1925
+ putMember ( methodKey ,
1926
+ new NaturalIdFinderMethod (
1927
+ this , method ,
1928
+ methodName ,
1929
+ returnType .toString (),
1930
+ containerType ,
1931
+ paramNames ,
1932
+ paramTypes ,
1933
+ parameterNullability (method , entity ),
1934
+ repository ,
1935
+ sessionType [0 ],
1936
+ sessionType [1 ],
1937
+ profiles ,
1938
+ context .addNonnullAnnotation (),
1939
+ jakartaDataRepository ,
1940
+ fullReturnType (method )
1941
+ )
1942
+ );
1943
+ break ;
1944
+ }
1945
+ // else intentionally fall through
1943
1946
case BASIC :
1944
1947
case MULTIVALUED :
1945
1948
final List <Boolean > paramPatterns = parameterPatterns ( method );
You can’t perform that action at this time.
0 commit comments