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 @@ -1900,25 +1900,28 @@ private void createSingleParameterFinder(
1900
1900
);
1901
1901
break ;
1902
1902
case NATURAL_ID :
1903
- putMember ( methodKey ,
1904
- new NaturalIdFinderMethod (
1905
- this , method ,
1906
- methodName ,
1907
- returnType .toString (),
1908
- containerType ,
1909
- paramNames ,
1910
- paramTypes ,
1911
- parameterNullability (method , entity ),
1912
- repository ,
1913
- sessionType [0 ],
1914
- sessionType [1 ],
1915
- profiles ,
1916
- context .addNonnullAnnotation (),
1917
- jakartaDataRepository ,
1918
- fullReturnType (method )
1919
- )
1920
- );
1921
- break ;
1903
+ if ( !usingStatelessSession ( sessionType [0 ] ) ) {// no byNaturalId() lookup API for SS
1904
+ putMember ( methodKey ,
1905
+ new NaturalIdFinderMethod (
1906
+ this , method ,
1907
+ methodName ,
1908
+ returnType .toString (),
1909
+ containerType ,
1910
+ paramNames ,
1911
+ paramTypes ,
1912
+ parameterNullability (method , entity ),
1913
+ repository ,
1914
+ sessionType [0 ],
1915
+ sessionType [1 ],
1916
+ profiles ,
1917
+ context .addNonnullAnnotation (),
1918
+ jakartaDataRepository ,
1919
+ fullReturnType (method )
1920
+ )
1921
+ );
1922
+ break ;
1923
+ }
1924
+ // else intentionally fall through
1922
1925
case BASIC :
1923
1926
case MULTIVALUED :
1924
1927
final List <Boolean > paramPatterns = parameterPatterns ( method );
You can’t perform that action at this time.
0 commit comments