Skip to content

Commit

Permalink
add forward compatible method for doctrine/persistence#334
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Apr 3, 2024
1 parent d3c282b commit 52176f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Doctrine/ODM/PHPCR/DocumentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Doctrine\ODM\PHPCR\Translation\TranslationStrategy\ChildTranslationStrategy;
use Doctrine\ODM\PHPCR\Translation\TranslationStrategy\TranslationStrategyInterface;
use Doctrine\Persistence\ObjectRepository;
use Doctrine\Persistence\Proxy;
use PHPCR\ItemNotFoundException;
use PHPCR\NodeInterface;
use PHPCR\PathNotFoundException;
Expand Down Expand Up @@ -656,4 +657,9 @@ public function getDocumentId(object $document): ?string
{
return $this->unitOfWork->getDocumentId($document);
}

public function isUninitializedObject(mixed $value): bool
{
return $value instanceof Proxy && !$value->__isInitialized();
}
}

0 comments on commit 52176f9

Please sign in to comment.