Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3741

Hibernate's legacy org.hibernate.Criteria API is deprecated

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0
    • Fix Version/s: 7.0
    • Component/s: API
    • Labels:
    • Attachments:
      0
    • Comments:
      3
    • Documentation Status:
      Not Required

      Description

      When running the DSpace 7 REST API, the Tomcat logs contain this warning:

      WARN 16413 --- [bio-8009-exec-4] org.hibernate.orm.deprecation            : HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
      

      It seems that with the upgrade of Hibernate, we should also move to the official JPA CriteriaQuery interfaces.

      In addition, I think this is also a good opportunity to move our static queries (queries for which the structure is fixed and only the variable values change) to JPA Named queries (https://docs.oracle.com/javaee/6/tutorial/doc/bnbrg.html). These queries are parsed and compiled at application startup and not on every execution.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tom.desair Tom Desair
              Reporter:
              tom.desair Tom Desair
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: