Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002777 [Resin] minor always 07-09-08 09:15 07-14-08 11:22
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.0 Product Version 3.2.0
  Product Build
Summary 0002777: Amber setMaxResults issue
Description (rep by Riccardo Cohen)

I checked on 07/07 snapshot and the behaviour is conform now.
But there is still a bug in the couple setFirstResult() and setMaxResults().

I have a small sample where I can select first item and count. The count is set to 20.
When I set first = 0 I have 25 items returned. Same until 5.
When I set first = 6, I have only 19 results
When I set first = 10, I have only 15 results
When I set first = 22, I have only 3 results
for all those, the sql select ends by LIMIT 25

Now if I set first=25, the the select is correct : LIMIT 25, 20 and I really have 20 items. Same for higher values.

No emergency but just for info. Thanks.


ps: the code is

      javax.persistence.Query hqr=m_manager.createQuery("select h from Adluser h order by h.id");
      log.info("start="+numstart+" cnt="+numcnt);
      hqr.setFirstResult(numstart);
      hqr.setMaxResults(numcnt);
      ret=(List<Adluser>)hqr.getResultList();


Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003272)
ferg
07-14-08 11:22

jpa/1433
 

- Issue History
Date Modified Username Field Change
07-09-08 09:15 ferg New Issue
07-14-08 11:22 ferg Note Added: 0003272
07-14-08 11:22 ferg Assigned To  => ferg
07-14-08 11:22 ferg Status new => closed
07-14-08 11:22 ferg Resolution open => fixed
07-14-08 11:22 ferg Fixed in Version  => 3.2.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker