views:

492

answers:

3

In the spirit of type safety associated with the CriteriaQuery JPA 2.0 also has an API to support 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

A: 

Alright, found it

They hid it well...

The set-up is described on Hibernate's website

Andrey
+4  A: 

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

OpenJPA

DataNucleus


For Hibernate, the implementation is provided by hibernate-jpamodelgen-1.0.0.Final.jar

Pascal Thivent
any chance for a link to a compiled Hibernate Static Metamodel Generator (in a form of a JAR file)? What I found only contained sources and pom.xml. I don't use maven and just want a simple JAR which I can't seem to find
Andrey
@yamsha: Link to the jar added.
Pascal Thivent
Pascal, you're a life saver (again). I've been looking for that jar file for hours :))
Bogdan
@Bogdan: Well, glad it was helpful for you too then :)
Pascal Thivent