We're updating the issue view to help you get more done. 

Add support for EntityMode.MAP to JPA Criteria API

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.

Environment

4.1.7, EntityMode.MAP

Status

Assignee

Steve Ebersole

Reporter

Brad Koehn

Fix versions

Labels

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

Affirmative

Pull Request

None

backportDecision

None

Affects versions

4.1.7

Priority

Minor