Skip to content

Commit 89b24b8

Browse files
committed
HHH-17002 enable use of query plan cache for Jakarta Data Orders and Restrictions
shows that something's wrong, since the tests broke
1 parent 646b876 commit 89b24b8

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

hibernate-core/src/main/java/org/hibernate/query/sqm/internal/AbstractSqmSelectionQuery.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ public SelectionQuery<R> setOrder(List<? extends Order<? super R>> orderList) {
186186
final SqmSelectStatement<R> selectStatement = getSqmSelectStatement().copy( noParamCopyContext( SqmQuerySource.CRITERIA ) );
187187
selectStatement.orderBy( orderList.stream().map( order -> sortSpecification( selectStatement, order ) )
188188
.collect( toList() ) );
189-
// TODO: when the QueryInterpretationCache can handle caching criteria queries,
190-
// simply cache the new SQM as if it were a criteria query, and remove this:
191-
getQueryOptions().setQueryPlanCachingEnabled( false );
192189
setSqmStatement( selectStatement );
193190
return this;
194191
}
@@ -198,9 +195,6 @@ public SelectionQuery<R> setOrder(List<? extends Order<? super R>> orderList) {
198195
public SelectionQuery<R> setOrder(Order<? super R> order) {
199196
final SqmSelectStatement<R> selectStatement = getSqmSelectStatement().copy( noParamCopyContext( SqmQuerySource.CRITERIA ) );
200197
selectStatement.orderBy( sortSpecification( selectStatement, order ) );
201-
// TODO: when the QueryInterpretationCache can handle caching criteria queries,
202-
// simply cache the new SQM as if it were a criteria query, and remove this:
203-
getQueryOptions().setQueryPlanCachingEnabled( false );
204198
setSqmStatement( selectStatement );
205199
return this;
206200
}
@@ -209,9 +203,6 @@ public SelectionQuery<R> setOrder(Order<? super R> order) {
209203
public SelectionQuery<R> addRestriction(Restriction<? super R> restriction) {
210204
final SqmSelectStatement<R> selectStatement = getSqmSelectStatement().copy( noParamCopyContext( SqmQuerySource.CRITERIA ) );
211205
restriction.apply( selectStatement, selectStatement.<R>getRoot( 0, getExpectedResultType() ) );
212-
// TODO: when the QueryInterpretationCache can handle caching criteria queries,
213-
// simply cache the new SQM as if it were a criteria query, and remove this:
214-
getQueryOptions().setQueryPlanCachingEnabled( false );
215206
setSqmStatement( selectStatement );
216207
return this;
217208
}

0 commit comments

Comments
 (0)