HHH-9784 Scroll method does not support provided HQLQueryPlan
(cherry picked from commit 09127bf1c3
)
This commit is contained in:
parent
3da8d8542f
commit
4fcb465311
|
@ -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