Doctrine\ORM\EntityManager::getReference
Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded.
Signature
public function getReference(string
$entityName,
mixed
$id )
Parameters
$entityName
— string- The name of the entity type.
$id
— mixed- The entity identifier.
Returns
- The entity reference.