I am having trouble developing an web app using tomcat 7 and jdk 6.
I am using an DB-VA generated ORM.
I am getting the error:
org.orm.PersistentException: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [siturisweb.roteiros.VisitaInteresse#38]
I have an entity (Roteiros) which has a collection of (VisitaInteresse) and a collection of another entity.
I have a form to capture it all and at the end i do all the “saving”, something like this:
Roteiro r = RoteiroDAO.createRoteiro() r.setXPTO... r.set....
then I use a for each, where I go through an arrayList of VisitaInteresse and do the following at each iteration:
... r.visitaInteresses.add(temp) ...
After everything, I save:
Can someone help me?