HHH-9784 Scroll method does not support provided HQLQueryPlan
This commit is contained in:
parent
1677e0662b
commit
09127bf1c3
|
@ -1344,7 +1344,12 @@ public final class SessionImpl extends AbstractSessionImpl implements EventSourc
|
||||||
public ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException {
|
public ScrollableResults scroll(String query, QueryParameters queryParameters) throws HibernateException {
|
||||||
errorIfClosed();
|
errorIfClosed();
|
||||||
checkTransactionSynchStatus();
|
checkTransactionSynchStatus();
|
||||||
HQLQueryPlan plan = getHQLQueryPlan( query, false );
|
|
||||||
|
HQLQueryPlan plan = queryParameters.getQueryPlan();
|
||||||
|
if (plan == null) {
|
||||||
|
plan = getHQLQueryPlan( query, false );
|
||||||
|
}
|
||||||
|
|
||||||
autoFlushIfRequired( plan.getQuerySpaces() );
|
autoFlushIfRequired( plan.getQuerySpaces() );
|
||||||
dontFlushFromFind++;
|
dontFlushFromFind++;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue