Yes, Hibernate can handle this situation with no problem. The
a different object with the same identifier value was already associated with the session error message is usually the result of trying to mix objects that have been loaded by different Hibernate sessions into another Hibernate session. If I find myself in a situation like this, I usually try to re-load the object with the current session.
Eg. something like this:
Code:
MyEntity e = ... // loaded in another session
e = (MyEntity)session.get(e.getClass(), e.getId());