Home > Blockchain >  Are Restrictions and Projections deprecated from Hibernate 5.2 onwards?
Are Restrictions and Projections deprecated from Hibernate 5.2 onwards?

Time:08-02

Are Restrictions and Projections deprecate from Hibernate 5.2 onwards? If so what are the JPA Criteria API equivalents.

Other Related Q's -

  1. Does the Hibernate Criteria Extensions API (which supports deprecated api have the Restriction an Projections as part of them still. If they do. Could you share the api doc)
  2. Is there some place where i can find what all api's/classes/methods are deprecated. I have gone through legacy-criteria , but it does not clearly say what all things are deprecated. It would have been nice if they listed them out explicitly.

CodePudding user response:

Providing an answer for Hibernate 5.6.x:

  • Restrictions is not marked deprecated. Check the corresponding JavaDoc.

  • Projections, likewise, is also not marked deprecated, see related JavaDoc.

As it stands now, both classes are not deprecated for version 5.6.x. Nevertheless, Hibernate’s Criteria API is deprecated as such, and ongoing development (version 6 ) will focus on the JPA Criteria API.

However, it seems open for debate if the JPA community will move forward towards the vendor-agnostic CriteriaBuilder.

Check the deprecation list of Hibernate‘s JavaDoc for an overview and further details.

  • Related