Uploaded image for project: 'Hibernate ORM'
  1. Hibernate ORM
  2. HHH-7714

Add support for EntityMode.MAP to JPA Criteria API

    Details

    • Requires Release Note:
      Affirmative
    • Last commented by a user?:
      true
    • Suitable for new contributors:
      Yes, likely

      Description

      According to the documentation, the old Hibernate criteria API is deprecated and the JPA criteria API should be used in its place. Unfortunately the Hibernate implementation of the JPA criteria API doesn't support EntityMode.MAP. This prevents developers from using JPA criteria queries for dynamic systems (systems which don't use classes to represent types).

      I've created a branch in GitHub (https://github.com/koehn/hibernate-orm) to address this issue. It allows developers to use EntityTypes and names to look up types and properties, respectively. The developer can then create a Hibernate configuration with PersistentClasses, Tuplizers, InstanceAccessors, etc. which may be used with the JPA Criteria API.

      Note that the implementation doesn't require the use of Map as the type to represent a type. The existing code makes some strong assumptions that Map implementations must represent the type.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 336h Original Estimate - 336h
                  336h
                  Remaining:
                  Time Spent - 3h 28m Remaining Estimate - 336h
                  336h
                  Logged:
                  Time Spent - 3h 28m Remaining Estimate - 336h
                  3h 28m