Hi,
I have a large list for which I want to support a paged iterator, so retrieve page by page of data from the db. I use session.createFilter and the setMaxResults() to implement the paging
However, how can I set that the returned data must be in the order of the listindex column? The list index column is not mapped so I can't just add an order by to the createFilter second parameter. I tried something like:
Code:
session.createFilter(collection, "order by index(this)");
This did not work (got a sql exception, function index not known).
Is there another/better and generic way I can accomplish this (return a sorted list by listindex from the createFilter method)?
Thanks for any insights in this!
gr. Martin