Doctrine\ORM\EntityManager::detach
Detaches an entity from the EntityManager, causing a managed entity to become detached. Unflushed changes made to the entity if any (including removal of the entity), will not be synchronized to the database.
Entities which previously referenced the detached entity will continue to reference it.
Signature
Parameters
$entity
— object- The entity to detach.