Skip to content

Commit

Permalink
repository: revert obtaining entity by entity instance
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Apr 15, 2021
1 parent 4bea473 commit d3586f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Repository/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ public function getById($id): ?IEntity
{
if ($id === null) {
return null;
} else if ($id instanceof IEntity) { // deprecated
$id = $id->getValue('id');
}

$entity = $this->identityMap->getById($id);
Expand Down

0 comments on commit d3586f8

Please sign in to comment.