You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hibernate introduce SelectionQuery.getResultCount() since 6.5.0, It's useful for paged query, Query object can be reused for both data and count query.
Queryquery = entityManager.createQuery(queryString);
query.setFirstResult(10);
query.setMaxResults(10);
result.setTotal(query.getResultCount()); // must ignore `firstResult` and `maxResults`result.setData(query.getResultList());
The text was updated successfully, but these errors were encountered:
Hibernate introduce
SelectionQuery.getResultCount()
since 6.5.0, It's useful for paged query,Query
object can be reused for both data and count query.The text was updated successfully, but these errors were encountered: