Hibernate Pagination: Memory-side loading when using JOIN FETCH
Hibernate utilizes setFirstResult() and setMaxResults() to implement pagination, typically delegating the offset and limit logic to the database via the configured SQL dialect. A specific behavioral conflict occurs when JOIN FETCH is applied to a collection within a paginated query. Because joining a one-to-many relationship can produce duplicate parent rows