Issue
In the spirit of type safety associated with the CriteriaQuery JPA 2.0 also has an API to support rel="noreferrer">Metamodel representation of entities.
Is anyone aware of a fully functional implementation of this API (to generate the Metamodel as opposed to creating the metamodel classes manually)? It would be awesome if someone also knows the steps for setting this up in Eclipse (I assume it's as simple as setting up an annotation processor, but you never know).
EDIT: Just stumbled across Hibernate JPA 2 Metamodel Generator . But the issue remains since I can't find any download links for the jar.
EDIT 2: Awhile has passed since I asked this question, but I thought I'd come back and add a link to the Hibernate JPA Model Generator project on SourceForge
Solution
It would be awesome if someone also knows the steps for setting this up in Eclipse (I assume it's as simple as setting up an annotation processor, but you never know)
Yes it is. Here are the implementations and instructions for the various JPA 2.0 implementations:
EclipseLink
Hibernate
org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor
- http://in.relation.to/2009/11/09/hibernate-static-metamodel-generator-annotation-processor
OpenJPA
org.apache.openjpa.persistence.meta.AnnotationProcessor6
- http://openjpa.apache.org/builds/2.4.1/apache-openjpa/docs/ch13s04.html
DataNucleus
org.datanucleus.jpa.JPACriteriaProcessor
- http://www.datanucleus.org/products/accessplatform_2_1/jpa/jpql_criteria_metamodel.html
The latest Hibernate implementation is available at:
An older Hibernate implementation is at:
Answered By - Pascal Thivent
Answer Checked By - Mary Flores (JavaFixing Volunteer)