...
You cannot call EntityManager.persist() or EntityManager.remove() on a Detached object.
Calling EntityManager.refresh() or EntityManager.merge() will re-attach a Detached object.
...
...
You cannot call EntityManager.persist() or EntityManager.remove() on a Detached object.
Calling EntityManager.refresh() or EntityManager.merge() will re-attach a Detached object.
...