Hibernate version:3.0.5
I have been using setFirstResult and setMaxResults to perform pagination successfully for quite some time using a fairly static data set.
I now want to use the same solution, but the data is slightly more dynamic and between pages, some data in the initial (page 1) query, may have fallen out of scope...
This gives me a problem (that I have not actually yet seen, but conceptually I think will happen), in that if I have:
- page sizes of 10 - 21 objects *iniitally returned from the query numbered 1 to 21...
When I access the first page, I see object id's 1 to 10 which is fine...
But when I press next (page), I set setFirstResult(10), but because object id 1 has fallen out of scope (of my query), object id 11 is now the 10th object and therefore does not get displayed at the top of page 2 (which is what I want..)
What I really want instead of setFirstResult, is a setFirstResultObjectId > 10 which should then return object id 11 at the top of page 2 as expected...
Has anyone experienced this and got a workaround for it?
Name and version of the database you are using:Oracle 9i
|