1

When I use standard url for getting entities spring data rest adds Page object to json:

   "page": {
            "size": 20,
            "totalElements": 144429,
            "totalPages": 7222,
            "number": 0
        }

but when I wrote custom query

List<Mat> filter(@Param("mat")String mat, @Param("nazwam") String nazwam,
                        @Param("minExceeded") Integer minExceeded,
                        @Param("warehouseId") Integer warehouseId, @Param("groupId") Integer groupId, Pageable p);

Pagination (size=1&page=2&) is still working but the result doesn't contain information about total element count

Is there an option to enable this in custom queries?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
moss
  • 81
  • 1
  • 4

0 Answers0