Doctrine\ORM\EntityManager::merge
Merges the state of a detached entity into the persistence context of this EntityManager and returns the managed copy of the entity.
The entity passed to merge will not become associated/managed with this EntityManager.
Signature
Parameters
$entity
— object- The detached entity to merge into the persistence context.
Returns
- The managed copy of the entity.