Empty identifiers must be disallowed
This commit is contained in:
parent
0d82128b2e
commit
dbcdc1d42a
@ -1400,7 +1400,7 @@ class UnitOfWork implements PropertyChangedListener
|
||||
$classMetadata = $this->em->getClassMetadata(get_class($entity));
|
||||
$identifier = $this->entityIdentifiers[spl_object_hash($entity)];
|
||||
|
||||
if (in_array(null, $identifier, true)) {
|
||||
if (empty($identifier) || in_array(null, $identifier, true)) {
|
||||
throw ORMInvalidArgumentException::entityWithoutIdentity($classMetadata->name, $entity);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user