mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-18 09:05:21 +00:00
HHH-8426 Add defaultScrollMode to Dialect
This commit is contained in:
parent
6c708e2180
commit
a2da429997
@ -45,6 +45,7 @@
|
||||
import org.hibernate.LockOptions;
|
||||
import org.hibernate.MappingException;
|
||||
import org.hibernate.NullPrecedence;
|
||||
import org.hibernate.ScrollMode;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.dialect.function.CastFunction;
|
||||
import org.hibernate.dialect.function.SQLFunction;
|
||||
@ -2671,4 +2672,13 @@ public boolean supportsNotNullUnique() {
|
||||
public String getQueryHintString(String query, List<String> hints) {
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Certain dialects support a subset of ScrollModes. Provide a default to be used by Criteria and Query.
|
||||
*
|
||||
* @return ScrollMode
|
||||
*/
|
||||
public ScrollMode defaultScrollMode() {
|
||||
return ScrollMode.SCROLL_INSENSITIVE;
|
||||
}
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ public List list() throws HibernateException {
|
||||
}
|
||||
@Override
|
||||
public ScrollableResults scroll() {
|
||||
return scroll( ScrollMode.SCROLL_INSENSITIVE );
|
||||
return scroll( session.getFactory().getDialect().defaultScrollMode() );
|
||||
}
|
||||
@Override
|
||||
public ScrollableResults scroll(ScrollMode scrollMode) {
|
||||
|
@ -76,7 +76,7 @@ public Iterator iterate() throws HibernateException {
|
||||
}
|
||||
|
||||
public ScrollableResults scroll() throws HibernateException {
|
||||
return scroll( ScrollMode.SCROLL_INSENSITIVE );
|
||||
return scroll( session.getFactory().getDialect().defaultScrollMode() );
|
||||
}
|
||||
|
||||
public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException {
|
||||
|
@ -171,7 +171,7 @@ public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException
|
||||
}
|
||||
|
||||
public ScrollableResults scroll() throws HibernateException {
|
||||
return scroll(ScrollMode.SCROLL_INSENSITIVE);
|
||||
return scroll( session.getFactory().getDialect().defaultScrollMode() );
|
||||
}
|
||||
|
||||
public Iterator iterate() throws HibernateException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user