From: <leg...@at...> - 2003-07-08 23:52:43
|
The following issue has been updated: Updater: Gavin King (mailto:ga...@in...) Date: Tue, 8 Jul 2003 6:51 PM Comment: Is this really needed? Creating a new Query instance is simple enough.... Changes: type changed from Bug --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-162&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-162 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-162 Summary: No way to reset the maxResults() on a Query Type: Improvement Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Reporter: Christian Bauer Created: Tue, 8 Jul 2003 3:41 PM Updated: Tue, 8 Jul 2003 6:51 PM Description: There is currently no way to reset the maximum number of results (query.setMaxResults(int)) returned from a Query once it has been set to a value. While you can certainly set it to Integer.MAX_VALUE, that seems impractical. I have tried query.setMaxResults(0) which produces "zero" results, and query.setMaxResults(-1) which produces an exception. I have looked at the source code and noticed that internally the value is maintained as an Integer and initially starts as "null", however they current interface provides no mechanism to reset the value to "null" as the calling signature is as show above Query.setMaxResults(int). My suggestion would be to simply take any value < 1 as a reset. Cheers, Dawson --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |