Announcement Announcement Module
No announcement yet.
Total pagination parameters missing in JSON response Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Total pagination parameters missing in JSON response


    when using pagination parameters for a call to my Spring Data REST-based URL, I get a correctly paged result with paging values for offset, page etc. However, the parameters for totalPages and totalElements are missing. I have simply extended my repository from PagingAndSortingRepository - do I have to do additional configuration for this?

  • #2
    What backing store (module) are you using? IIRC not all stores can calculate total results (cheaply), so they might not calculate it, see


    • #3
      I am using JPA with Hibernate. Maybe it's because I'm using HSQLDB? I thought that supports a COUNT query.


      • #4
        For that configuration (I used the exact same one in a project a couple of months ago), it should work out of the box, without any additional configuration required to get the total* elements to show. HSQLDB shouldn't the a problem either - it's used in the sample project (Spring Data book) without issues ...