Search code examples
jpaentitymanagerdetach

JPA2 -- Where is EntityManager.detach?


I read in several places that JPA2 will support a detach method call on Entity Manager. I am running with Hibernate 3.5.1-FINAL and Spring 3.0.2-RELEASE as Maven dependencies -- snagged from the JBoss repository.

Isn't this enough?

Perhaps the problem is with my javax.persistence.EntityManager interface definition. Do I need to update javax? How does one do this?


Solution

  • Well, I figured it out. My maven project (at the top level) had a dependency on javax.persistence persistence-api 1.0. I took this out and replaced it with hibernate-jpa-2.0-api 1.0.0.FINAL and viola...i have detach!