setMaxResults vs ScrollableResults: Handling Duplicate Roots in Fetch Joins
Large‑Dataset Pagination with Fetch Joins When querying a parent entity that eagerly fetches a collection, Hibernate can materialize the same root multiple times before deduplication. This becomes problematic when paginating a very large result set: the setMaxResults method applies a LIMIT/OFFSET clause, but the offset may be applied after the join, causing