[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2592?page=c...
]
Steve Ebersole updated HHH-2592:
--------------------------------
Priority: Trivial (was: Major)
Assignee: Steve Ebersole
Fix Version/s: 3.3
This needs to be controllable behavior. In other words I don't want this happening
"out of the box".
I'd consider a config option, but we already have way too many of those as it is.
So more, I am inclined to delegate this to the dialect, allowing the user to re-define the
behavior through a custom dialect. That should only require addition of the new dialect
method and a minor change to org.hibernate.loader.Loader#useLimit:
private static boolean useLimit(final RowSelection selection, final Dialect dialect) {
return dialect.supportsLimit() && hasMaxRows( selection );
}
becomes:
private static boolean useLimit(final RowSelection selection, final Dialect dialect) {
return dialect.supportsLimit() && ( hasMaxRows( selection ) ||
dialect.forceLimitUsage() );
}
force hibernate to generate use offset qeury when offset is zero
----------------------------------------------------------------
Key: HHH-2592
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2592
Project: Hibernate3
Issue Type: Improvement
Components: query-criteria, query-hql, query-sql
Affects Versions: 3.2.3
Environment: Hibernate Core 3.2.3 + Hibernate Annotations 3.3.0
JDK 5.0
Oracle 10g r2
Reporter: Amir Pashazadeh
Assignee: Steve Ebersole
Priority: Trivial
Fix For: 3.3
Attachments: patch.zip
I know this is mostly an Oracle issue, but believe me it is harder to fix it in Oracle!
when the offset of a paged query is zero, Hibernate does not append offset part to query,
but the result which is returned by oracle without the offset part, and result returned
when offset is zero is different.
so some records are retrieved in different pages, and some records (which must be in
first page) are not retrieved at all.
----
the patch is included.
(I've only included Oracle9Dialect which I used)
--
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