Hello,
I didnt used the hibernate, i just use EJB3 and
JBoss, i get this Exception when i try to save beans with entityManager.persisten().
Finance newFinance = new Finance(this.entityManager.find(User.class, userName), ...);
this.entityManager.persistence(newFinance);
Finance newFinance2 = new Finance(this.entityManager.find(User.class, userName), ...);
this.entityManager.persistence(newFinance2); // I GOT THE EXCEPTION HERE
the Finance and the User are entity beans, which Finance has a User property.
And i got the org.hibernate.NonUniqueObjectException a different object with the same identifier value was already associated with the session: [entities.User] when the second persistence() be called.
I search in Internet, found some solve, but they are all about Hibernate. So what should I do only with EJB3?
thanks!