[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3750?page=c...
]
Steve Ebersole commented on HHH-3750:
-------------------------------------
I am thinking along the lines of adding a method to Dialect like:
/**
* Hibernate APIs explcitly state that setFirstResult() should be a zero-based number.
Here we allow the
* Dialect a chance to convbert that value based on what the underlying db or driver will
expect.
*
* @param zeroBasedFirstResult The user-supplied, zero-based first row offset.
*
* @return The corresponding db/dialect specific offset.
*
* @see org.hibernate.Query#setFirstResult
* @see org.hibernate.Criteria#setFirstResult
*/
public int convertToFirstRowLimit(int zeroBasedFirstResult) {
return zeroBasedFirstResult;
}
Allow dialects to handle difference in how Query.setFirstResult()
should be interpreted
---------------------------------------------------------------------------------------
Key: HHH-3750
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3750
Project: Hibernate Core
Issue Type: Improvement
Components: core
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Specifically, it appears that some databases will interpret the number we bind as
0-based, while others interpret it as 1-based. We should allow Dialects to handle this
difference.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira