Just as the title says. Is it deprecated? It says in the dev manual that it is and we should user JPA Criteria, but in the user manual there is no mention of this.
AFAIK and off looking at the Javadocs, the Hibernate Criteria API is not deprecated. However, there is a very good argument for using JPA over hibernate, as it means you can switch between persistence providers without having to modify your code. Where as if you go with the Hibernate Criteria API, then your code is completely tied in to Hibernate.
From the Hibernate 5.2 documentation.
"This appendix covers the legacy Hibernate org.hibernate.Criteria API, which should be considered deprecated.
New development should focus on the JPA javax.persistence.criteria.CriteriaQuery API. Eventually, Hibernate-specific criteria features will be ported as extensions to the JPA javax.persistence.criteria.CriteriaQuery. For details on the JPA APIs, see Criteria.".
This means, the Hibernate criteria is usable as it isn't officially @Deprecated, but you should be using JPA instead!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With