Jpa entitymanager merge not updating

I have numerous threads which can potentially write to the same record in a table. If I then try to merge in an object that has content for the Any Type-reference, the merge() fails with a Null Pointer Exception in Any Modified(), when Hibernate tries to check whether the anytype-object has been updated. Hibernate version: 3.1.2 Hi Everyone, My problem is the following: I'm working on a 3 tier application. I've got a problem with entity A that I load, modify and then merge.

The merge return a detached object and my hibernate session is closed. Hi, i have a problem with getting duplicate errors on merges. there is a unidirectional many-to-many form articles to items.

In the context of an update to an existing entity rather than persisting a new entity, I can understand this rational.

However, one point in the documentation discussed here: ...

Applogies if this question have already been asked.

Schema Export; public class Person Test { public static void main(String args[]) { Annotation Configuration c = new Annotation Configuration(); Annotated Class(Koushks10.satyajeet.class); c.configure("xml"); new Schema Export(c).create(true, true); Session Factory sf = Session Factory(); /* Transient state to persistent state*/ Session s = Session(); s.begin Transaction(); satyajeet ref=new satyajeet(); Name("satyajeet"); Email("[email protected]");; ...

At the time of update, the parent is detached from the session, as are all the children.