Update UnitOfWork.php
This commit is contained in:
parent
643ae78691
commit
1ae153d315
1 changed files with 2 additions and 2 deletions
|
@ -834,8 +834,8 @@ class UnitOfWork implements PropertyChangedListener
|
|||
$targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
|
||||
|
||||
foreach ($unwrappedValue as $key => $entry) {
|
||||
if (! ($entry instanceof $assoc['targetEntity']))) {
|
||||
throw ORMInvalidArgumentException::invalidAssociation($entry);
|
||||
if (! ($entry instanceof $targetClass->name))) {
|
||||
throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry);
|
||||
}
|
||||
|
||||
$state = $this->getEntityState($entry, self::STATE_NEW);
|
||||
|
|
Loading…
Add table
Reference in a new issue