From: <leg...@at...> - 2003-07-08 20:41:47
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- 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: Bug 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 3:41 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 |