User gets a warning message because open source code uses deprecated hibernate.Criteria

Description

In version 15.0 our lib/optional/hibernate/xap-hibernate-spring.jar
is using org.hibernate.Criteria API which is deprecated and causes the following warning message:
2020-02-11 13:59:23,557 WARN [pool-10-thread-32] org.hibernate.orm.deprecation 1859 - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead

Checking our open source code I have found 16 occurrences of org.hibernate.Criteria use. All of them in:
/xap/xap-extensions/xap-hibernate-spring model.
Even though using this jar is not a must, we need to make sure that the user will not get warning messages when using the product in the right way.

Seems that we can use:
javax.persistence.criteria.CriteriaBuilder
javax.persistence.criteria.CriteriaQuery
instead.

Workaround

None

Acceptance Test

No regressions

Assignee

Niv Ingberg

Reporter

Yuval Dori

Labels

None

Priority

Medium

SalesForce Case ID

12826

Fix versions

Commitment Version/s

None

Due date

None

Product

XAP

Edition

Open Source

Platform

All
Configure