Hibernate JOIN FETCH Queries Trigger In‑Memory Pagination When Using setFirstResult/setMaxResults
The goal is to retrieve a large dataset from a relational database using Hibernate while applying a JOIN FETCH to eagerly load associated entities and simultaneously limiting the result set with setFirstResult() and setMaxResults() for pagination. The application must avoid loading the entire joined result into the persistence context, which would cause an O