Patrick Lübbecke (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=61a7428...
) *commented* on HHH-15599 (
https://hibernate.atlassian.net/browse/HHH-15599?atlOrigin=eyJpIjoiODMxZG...
)
Re: Support conditional order-by clauses in QueryBuilder (
https://hibernate.atlassian.net/browse/HHH-15599?atlOrigin=eyJpIjoiODMxZG...
)
In the meantime I have found a different approach that works in 5.6. I used selectCase()
to achieve what I needed:
List<Order> orderStatements = new ArrayList<>();
orderStatements.add(cb.desc(cb.selectCase().when(cb.equal(root.get("rmgtnav_collection_type"),
"PROFILE"), 0).otherwise(1)));
(
https://hibernate.atlassian.net/browse/HHH-15599#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15599#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:a51bb46 )