1

I'm having issues with findAll method which I am overriding from JpaSpecificationExecutor

@Repository
public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificationExecutor<User> {
@Query(value = "select distinct user from User user left join fetch user.shopList shopList",
            countQuery = "select count(distinct user) from User user")
    Page<User> findAll(Specification specification, Pageable pageable);
}

I get "firstResult/maxResults specified with collection fetch. In memory pagination was about to be applied" error. It's like it's not using Pageable object at all.

Losmi
  • 41
  • 1
  • 4
  • 2
    Does this answer your question? [How can I avoid the Warning "firstResult/maxResults specified with collection fetch; applying in memory!" when using Hibernate?](https://stackoverflow.com/questions/11431670/how-can-i-avoid-the-warning-firstresult-maxresults-specified-with-collection-fe) – Oleksii Valuiskyi Dec 08 '20 at 06:10

0 Answers0