Query.setMaxResults(0) seems to fail [message #628958] |
Fri, 24 September 2010 21:42 |
Tim Messages: 21 Registered: June 2010 |
Junior Member |
|
|
So I do a query like:
public List fetchResults(Query query, int start, int max) {
return result = query.setFirstResult(start).setMaxResults(max).getResultList();
If I run with (5,2), I end up seeing a query from EL in the logs of the form:
SELECT id AS a1...FROM `tablename` LIMIT ?, ?
bind => [5, 2]
but if I have (5,0), I end up with:
SELECT id AS a1...FROM `tablename`
There is obviously some code missing that does other stuff, but the key is that I end up getting a full result set from "tablename". I could see no indication in the javadoc that there was special functionality for setMaxResults() with a max of 0, so I'm assuming this is a bug.
EL 2.1.0 via JPA
Let me know if I am missing something. Otherwise, I'll file a bug.
--Tim
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04163 seconds