Hibernate setMaxResults memory limits with join fetches
In-Memory Pagination Risk Hibernate provides setFirstResult() and setMaxResults() to handle pagination at the database level. However, the behavior changes when a query utilizes a JOIN FETCH on a collection to avoid N+1 select problems. When combining collection fetching with pagination limits, there is a documented risk that Hibernate cannot safely apply th