openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Pflueger <>
Subject AW: Slice setFirstResult with setMaxResults broken?
Date Mon, 22 Aug 2011 16:07:57 GMT
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 [] 
Gesendet: Donnerstag, 18. August 2011 02:11
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:
Sent from the OpenJPA Users mailing list archive at

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

View raw message