views:

306

answers:

2

I see that Hibernate home page has a symbol informing that it implements JSR 317, but I couldn't find if it implements the full spec. Does anybody knows if Hibernate 3.5.0-CR-2 fully implements the JSR 317?

I can see from their JIRA that everything is closed related to JPA 2.0:

http://opensource.atlassian.com/projects/hibernate/browse/HHH-4190?subTaskView=all

Anyone has experienced using JPA2.0 with Hibernate? Does it implement the full spec?

+2  A: 

The release notes for 3.5-CR1 claim full JPA 2.0 compliance:

I am pleased to announce that we have just released Hibernate version 3.5.0-CR-1. As a refresher, Hibernate follows the JBoss versioing scheme where CR is a "Candidate for Release" (what many of you might call RC). The main stated goal of 3.5 is JPA 2 compliance. This is the first release we believe achieves that goal entirely. In fact we are in the process of certifying for standalone JPA 2 compliance and have integrated this CR into the imminent JBoss AS M2 release as part of their effort towards full Java EE 6 compliance.

skaffman
But "full compliance" means it passes the JPA2 TCK; this doesn't mean that it fully implements JPA2. e.g if the TCK doesn't test a feature (either due to an omission, or due to something not being readily testable). In the same way though, this doesn't say that it doesn't fully implement it (just that their statement is only about testing).
DataNucleus
A: 

I am afraid to tell you that my own experience with the JPA2 implementation of Hibernate convinced me to wait a little.

For some reason, I could not get some very simple beans persisted, even worse when trying to generate some really basic relations. Replacing the Hibernate implementation with EclipseLink made the same code, which I promise is consistent with the JPA2 reference, work.

I would vote for EclipseLink.

And when did you have this experience, with exactly which version of hibernate?
Hans Westerbeek
Hi Hans, actually just right now. With mvn, org.eclipse.persistence.eclipselink|javax.persistence 2.0.0 works fine, while org.hibernate.hibernate-entitymanager 3.5.1-Final does not. My POJOs are really as simple as having one int id and one string name each using ManyToOne/OneToMany annotation syntax.Cheers