Issue
org.hibernate.query.criteria.internal.OrderImpl
does not exist anymore on hibernate
6.1.7-final
(version used on Spring Boot 3.0.5
) is there a way to replace it other than implement one myself?
Tried to replace with a custom implementation but I'm stuck on this
error: "(...).OrderImpl cannot be cast to class org.hibernate.query.sqm.tree.select.SqmSortSpecification"
Update: Still need to validate completely, but for now I've replace:
new OrderImpl(expression, isAcending);
for:
isAscending ? criteriabuilder.asc(expression) : criteriabuilder.desc(expression);
It seems to be working as expected now.
Solution
For my specific use CriteriaBuilder::asc(~) and CriteriaBuilder::desc(~) does work.
new OrderImpl(expression, isAcending);
for:
isAscending ? criteriabuilder.asc(expression) : criteriabuilder.desc(expression);
Answered By - Riberto Junior
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.