mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 16:44:57 +00:00
HHH-9784 - Scroll method does not support provided HQLQueryPlan
(cherry picked from commit be40ccf9ccf86d79f0eb1e8f9e3373b9df9e8ded)
This commit is contained in:
parent
4fcb465311
commit
7fba0e731e
@ -1327,7 +1327,12 @@ public Iterator iterate(String query, QueryParameters queryParameters) throws Hi
|
||||
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 ScrollableResults scroll(String query, QueryParameters queryParameters) t
|
||||
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…
x
Reference in New Issue
Block a user