This issue is also related to the dialect and LimitHandler being used. We are using org.hibernate.community.dialect.CacheDialect that using a TopLimitHandler. Depending on whether the code enters the if condition in org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan#withCacheableSqmInterpretation
|