Doctrine\ORM\UnitOfWork::tryGetById
Tries to find an entity with the given identifier in the identity map of this UnitOfWork.
Signature
public function tryGetById(mixed
$id,
string
$rootClassName )
Parameters
$id
— mixed- The entity identifier to look for.
$rootClassName
— string- The name of the root class of the mapped entity hierarchy.
Returns
- mixed
- Returns the entity with the specified identifier if it exists in
this UnitOfWork, FALSE otherwise.