HHH-9784 - Scroll method does not support provided HQLQueryPlan
This commit is contained in:
parent
09127bf1c3
commit
be40ccf9cc
|
@ -1327,7 +1327,12 @@ public final class SessionImpl extends AbstractSessionImpl implements EventSourc
|
|||
errorIfClosed();
|
||||
checkTransactionSynchStatus();
|
||||
queryParameters.validateParameters();
|
||||
HQLQueryPlan plan = getHQLQueryPlan( query, true );
|
||||
|
||||
HQLQueryPlan plan = queryParameters.getQueryPlan();
|
||||
if ( plan == null ) {
|
||||
plan = getHQLQueryPlan( query, true );
|
||||
}
|
||||
|
||||
autoFlushIfRequired( plan.getQuerySpaces() );
|
||||
|
||||
dontFlushFromFind++; //stops flush being called multiple times if this method is recursively called
|
||||
|
@ -1346,11 +1351,12 @@ public final class SessionImpl extends AbstractSessionImpl implements EventSourc
|
|||
checkTransactionSynchStatus();
|
||||
|
||||
HQLQueryPlan plan = queryParameters.getQueryPlan();
|
||||
if (plan == null) {
|
||||
if ( plan == null ) {
|
||||
plan = getHQLQueryPlan( query, false );
|
||||
}
|
||||
|
||||
autoFlushIfRequired( plan.getQuerySpaces() );
|
||||
|
||||
dontFlushFromFind++;
|
||||
try {
|
||||
return plan.performScroll( queryParameters, this );
|
||||
|
|
Loading…
Reference in New Issue