There are always so many questions related to issues with detached entities!
First, they often cause LazyInitializationException
in Hibernate.
Yes, there ar
It could be that an entity is seen as detached because it has the same ID as an entity in the persistence store. Imagine you got the entity from outside of the application. It could be that this entity is seen as detached when trying to persist it. There for you have to attach it again with, indeed, the merge.
I can't really imagine other situations and I'm curious for the other answers.