Hi all,

We're noticing some strange behavior with
Query.setFirstResult/Query.setMaxResults.
If we execute a query with these values set, we get the expected result.
However,
if we then execute the same query (in a new session, with a new Query)
without limiting
the resultset, we still only get the limited resultset.  

Example:

query1 = "select x from x in class XXXXX"
query1.setFirstResult(0);
query1.setMaxResults(20);
query1.list() //returns the 20 results we expect

then in a new session, we create a new Query object which just 
happens to have the same HQL.

query2 = "select x from x in class XXXXX"
query2.list()  //still only returns 20 rows.

Is there some sort of caching going on of the first/max values, or does the
PreparedStatement
cache think this is the same query, or is there something else going on
here?

Thanks,

Ken



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Reply via email to