Hibernate JOIN FETCH Pagination Falls Back to In-Memory Processing
Hibernate ORM supports pagination through the Query interface using setFirstResult and setMaxResults. When a query includes a JOIN FETCH on a collection association, Hibernate may apply pagination in memory rather than generating SQL LIMIT/OFFSET clauses. This fallback is intended to avoid Cartesian product data loss, but it can introduce significant memory