| I have created a discourse topic on this already and the mutual conclusion was that only a native query (with a window function) would solve more complex aggregated pagination: https://discourse.hibernate.org/t/get-the-total-result-size-of-a-query-with-aggregations-and-groupping/1381 |