Well, is it so hard to do? It's not very efficient, I guess. A seemingly simple solution would be to fetch the first offset+maxResults results from every slice, sort them in memory, skip offset results and return maxResults?
That probably would need a warning in the docs and possibly chunking code so to not load all objects into memory at once, because that could totally break for large offsets, I assume. -----Ursprüngliche Nachricht----- Von: Pinaki Poddar [mailto:ppod...@apache.org] Gesendet: Donnerstag, 18. August 2011 02:11 An: users@openjpa.apache.org Betreff: Re: Slice setFirstResult with setMaxResults broken? > Slice setFirstResult with setMaxResults broken? If the query has a order by clause, then yes. Just noticed. Tricky/interesting problem to solve. Any brave code warrior? ----- Pinaki Poddar Chair, Apache OpenJPA Project -- View this message in context: http://openjpa.208410.n2.nabble.com/Slice-setFirstResult-with-setMaxResults-broken-tp6695977p6697690.html Sent from the OpenJPA Users mailing list archive at Nabble.com. ___________________________________________________ SMA Solar Technology AG Aufsichtsrat: Guenther Cramer (Vorsitzender) Vorstand: Juergen Dolle, Roland Grebe, Uwe Hertel, Pierre-Pascal Urbon, Marko Werner Handelsregister: Amtsgericht Kassel HRB 3972 Sitz der Gesellschaft: 34266 Niestetal USt-ID-Nr. DE 113 08 59 54 WEEE-Reg.-Nr. DE 95881150 ___________________________________________________