hypersistence-utils
hypersistence-utils copied to clipboard
Add a findAll that takes a Pageable and returns a Slice instead of a Page
The PagingAndSortingRepository
has a Page<T> findAll(Pageable pageable)
method.
The problem is that returning a Page
will result in a count and a select statement.
The same problem is present in JpaSpecificationExecutor
. So it would be awesome to have this covered as well.
So, should we define findAll
that returns a Slice
instead?
One option would be to avoid extending any base interface and create additional interfaces that provide this extra functionality:
-
PagingBaseJpaRepository
-
SlicingBaseJpaRepository
+1 for the additional interfaces