I've been working on using Hibernate to map my metamodel which isn't known at compile-time (see here) using EntityMode.MAP
. I'd like to use the programmatic Criteria
queries, but as of Hibernate 4 they say that the Hibernate Criteria
query API is deprecated in favor of JPA. Fine.
But can I use JPA CriteriaQuery
for non-classes? I don't see a way to specify entities by name instead of by class using "pure" JPA. Is there some Hibernate (non-standard JPA) trickery that enhances the JPA to support EntityMode.MAP
?