From d3586f896bf92ce61e24525105372681b6bb2492 Mon Sep 17 00:00:00 2001 From: Jan Skrasek Date: Thu, 15 Apr 2021 21:18:04 +0200 Subject: [PATCH] repository: revert obtaining entity by entity instance --- src/Repository/Repository.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Repository/Repository.php b/src/Repository/Repository.php index 3a8652a5..fa021816 100644 --- a/src/Repository/Repository.php +++ b/src/Repository/Repository.php @@ -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);