Bugs item #689112, was opened at 2003-02-19 10:17
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428708&aid=689112&group_id=40712

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Ken Robinson (krobinson)
Assigned to: Nobody/Anonymous (nobody)
Summary: PreparedStatement setFirstResult()/MaxResults() odd behavior

Initial Comment:
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?


----------------------------------------------------------------------

>Comment By: Gavin King (oneovthafew)
Date: 2003-02-20 00:42

Message:
Logged In: YES 
user_id=384580

Thanks. This was a nasty bug in the PreparedStatementCache.
Now fixed in CVS (both sourcetrees).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428708&aid=689112&group_id=40712


-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Reply via email to