| The way we are using it, the subquery actually returns all columns. We expose a RESTful service that allows paging and sorting on that data via Spring Data JPA. Any number of columns can be sorted on. When the UI sorts by fiscal year in descending order while also paging, the user sees the same data for a number of pages. I would not expect that Hibernate would additionally sort by id automatically. With the proposed solution, that would not be necessary. Are there some concerns about implementing the proposed solution? |