Detach an entity from a JPA persistence context (JPA 2.0 / Hibernate / EJB 3 / J2EE 6)?

I assume you are using JPA 2.0 with the incorrect version of which doesn't implement the JPA 2.0 spec. The exception tells that the EntityManagerImpl doesn't have the required method.

I assume you are using JPA 2.0 with the incorrect version of which doesn't implement the JPA 2.0 spec. The exception tells that the EntityManagerImpl doesn't have the required method. I suggest upgrading hibernate to 3.5, which is a JPA 2.0 implementation.

Thanks! Just updated my 5.0 CR2 and it works great. – Julien Mar 29 '10 at 16:47 Is the detach operation recursive (i.e.In cascade)?

– Guido García Mar 30 at 7:02 @Guido - yes, if you have cascadeType=DETACH – Bozho Mar 30 at 7:37.

You can detach all entities with clear but detaching just one entity is not in the JPA 2.0. java.sun.com/javaee/5/docs/api/javax/per... You prolly had hibernate impl in your build path, and another implementation on your application server (EclipseLink? Or old hibernate version)... The em.

Detach is in bernate but not in JPA so you need the hibernate impl on your application server to use this function...

The answer from Bozho resolved my problem. Detach a single entity works FINE in JPA 2.0 (J2EE 6) – Julien Apr 8 '10 at 12:23 My mistake you are right it's in JPA 2.0 interface – Sebastien Lorber Apr 8 '10 at 14:19.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions