OutOfMemoryError during pagination with Join Fetch in Spring Data JPA
When implementing pagination for large datasets using Spring Data JPA with Hibernate, developers often use JOIN FETCH to optimize entity loading and avoid the N+1 select problem. However, combining fetch joins with Pageable parameters can lead to unexpected memory consumption. The core issue arises when Hibernate cannot translate the fetch join and paginatio