3.8. Deleting managed objects
EntityManager.remove()
will remove an objects state from the database. Of course, your application might still hold a reference to a deleted object. You can think of remove()
as making a persistent instance new (aka transient) again. It is not detached, and a merge would result in an insertion.