Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-13170 (
https://hibernate.atlassian.net/browse/HHH-13170?atlOrigin=eyJpIjoiNzdjNj...
)
Re: GORM: Challenges migrating away from deprecated Criteria API (
https://hibernate.atlassian.net/browse/HHH-13170?atlOrigin=eyJpIjoiNzdjNj...
)
So let me point you to APIs through which you can implement the following:
* Use jakarta.persistence.criteria.CriteriaBuilder#between}}and
{{jakarta.persistence.criteria.CriteriaBuilder#coalesce
* Use jakarta.persistence.criteria.CriteriaBuilder#lessThanOrEqualTo and
jakarta.persistence.criteria.CriteriaBuilder#sum with unsafe casts (please create an issue
for improving this by adding new methods to HibernateCriteriaBuilder )
* This is just a regular subquery. Unless you don’t have entities mapped for the tables,
you can just use the regular CriteriaQuery#subquery and
jakarta.persistence.criteria.CriteriaBuilder#in as well as
jakarta.persistence.criteria.CriteriaBuilder#not APIs
For the other examples, follow the same advice as in 3. and just use the subquery APIs. I
know the JPA Criteria API is not as nice as simply writing a String, but overall, the end
result will be easily portable, not only across JPA providers, but also across databases.
(
https://hibernate.atlassian.net/browse/HHH-13170#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13170#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#100204- sha1:f005d5a )