HHH-16109 Don't add limits to named queries when not needed

This commit is contained in:
Marco Belladelli 2023-02-07 14:24:08 +01:00 committed by Christian Beikov
parent 078c5bdc41
commit 21a837fda0
1 changed files with 4 additions and 4 deletions

View File

@ -1128,8 +1128,8 @@ public class QuerySqmImpl<R>
return new NamedCriteriaQueryMementoImpl(
name,
sqmStatement,
getFirstResult(),
getMaxResults(),
getQueryOptions().getLimit().getFirstRow(),
getQueryOptions().getLimit().getMaxRows(),
isCacheable(),
getCacheRegion(),
getCacheMode(),
@ -1147,8 +1147,8 @@ public class QuerySqmImpl<R>
return new NamedHqlQueryMementoImpl(
name,
getQueryString(),
getFirstResult(),
getMaxResults(),
getQueryOptions().getLimit().getFirstRow(),
getQueryOptions().getLimit().getMaxRows(),
isCacheable(),
getCacheRegion(),
getCacheMode(),