@@ -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