@@ -123,9 +123,6 @@ public SelectionQuery<R> setOrder(List<? extends Order<? super R>> orderList) {
123
123
final SqmSelectStatement <R > selectStatement = getSqmSelectStatement ().copy ( noParamCopyContext () );
124
124
selectStatement .orderBy ( orderList .stream ().map ( order -> sortSpecification ( selectStatement , order ) )
125
125
.collect ( toList () ) );
126
- // TODO: when the QueryInterpretationCache can handle caching criteria queries,
127
- // simply cache the new SQM as if it were a criteria query, and remove this:
128
- getQueryOptions ().setQueryPlanCachingEnabled ( false );
129
126
setSqmStatement ( selectStatement );
130
127
return this ;
131
128
}
@@ -135,9 +132,6 @@ public SelectionQuery<R> setOrder(List<? extends Order<? super R>> orderList) {
135
132
public SelectionQuery <R > setOrder (Order <? super R > order ) {
136
133
final SqmSelectStatement <R > selectStatement = getSqmSelectStatement ().copy ( noParamCopyContext () );
137
134
selectStatement .orderBy ( sortSpecification ( selectStatement , order ) );
138
- // TODO: when the QueryInterpretationCache can handle caching criteria queries,
139
- // simply cache the new SQM as if it were a criteria query, and remove this:
140
- getQueryOptions ().setQueryPlanCachingEnabled ( false );
141
135
setSqmStatement ( selectStatement );
142
136
return this ;
143
137
}
@@ -146,9 +140,6 @@ public SelectionQuery<R> setOrder(Order<? super R> order) {
146
140
public SelectionQuery <R > addRestriction (Restriction <? super R > restriction ) {
147
141
final SqmSelectStatement <R > selectStatement = getSqmSelectStatement ().copy ( noParamCopyContext () );
148
142
restriction .apply ( selectStatement , selectStatement .<R >getRoot ( 0 , getExpectedResultType () ) );
149
- // TODO: when the QueryInterpretationCache can handle caching criteria queries,
150
- // simply cache the new SQM as if it were a criteria query, and remove this:
151
- getQueryOptions ().setQueryPlanCachingEnabled ( false );
152
143
setSqmStatement ( selectStatement );
153
144
return this ;
154
145
}
0 commit comments