I\'m trying to get a page of a partial entity (NetworkSimple) using the new feature of spring data, projections
I\'ve checked the documentation and if I request only:
Even with spring-data-jpa 1.11.4, something like
public interface NetworkRepository extends JpaRepository {
Page findAll(Pageable pageable);
}
would not compile; reporting
findAll(org.springframework.data.domain.Pageable) in NetworkRepository clashes with findAll(org.springframework.data.domain.Pageable) in org.springframework.data.repository.PagingAndSortingRepository
return type org.springframework.data.domain.Page is not compatible with org.springframework.data.domain.Page
The workaround we found was to rename findAll to findAllBy, e.g.
public interface NetworkRepository extends JpaRepository {
Page findAllBy(Pageable pageable);
}