Skip to content

Commit 482b3f0

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 d318379 commit 482b3f0

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

-9
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ public SelectionQuery<R> setOrder(List<? extends Order<? super R>> orderList) {
123123
final SqmSelectStatement<R> selectStatement = getSqmSelectStatement().copy( noParamCopyContext() );
124124
selectStatement.orderBy( orderList.stream().map( order -> sortSpecification( selectStatement, order ) )
125125
.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 );
129126
setSqmStatement( selectStatement );
130127
return this;
131128
}
@@ -135,9 +132,6 @@ public SelectionQuery<R> setOrder(List<? extends Order<? super R>> orderList) {
135132
public SelectionQuery<R> setOrder(Order<? super R> order) {
136133
final SqmSelectStatement<R> selectStatement = getSqmSelectStatement().copy( noParamCopyContext() );
137134
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 );
141135
setSqmStatement( selectStatement );
142136
return this;
143137
}
@@ -146,9 +140,6 @@ public SelectionQuery<R> setOrder(Order<? super R> order) {
146140
public SelectionQuery<R> addRestriction(Restriction<? super R> restriction) {
147141
final SqmSelectStatement<R> selectStatement = getSqmSelectStatement().copy( noParamCopyContext() );
148142
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 );
152143
setSqmStatement( selectStatement );
153144
return this;
154145
}

0 commit comments

Comments
 (0)