How do you tell Hibernate that your entity class mappings are in JPA 1.0 syntax?
This is a follow开发者_JAVA百科-up to
Limitation of JPA 1.0 using @IdClass with *nested* composite primary keys?
EclipseLink comes with a javax.persistence_1.0.0.jar which I also put onto the classpath, so it can know about the version of my entity classes. But how does Hibernate know the entity classes are meant to be in JPA 1.0? Can it be done? If so, how?
But how does Hibernate know the entity classes are meant to be in JPA 1.0?
If this can be done, I would bet on the version of the persistence.xml
. But I'm really not sure this actually restricts the use of JPA 2.0 features.
Why not using a JPA 1.0 implementation if you want to be sure that you're not using anything from JPA 2.0 (i.e Hibernate EntityManager 3.4 in the case of Hibernate)? Is there anything that prevent you from doing so?
精彩评论