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.
|