1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

DDC-714 - Bug in refactored persistNew() functionality leads to failure with pre-persist id generators

This commit is contained in:
Benjamin Eberlei 2010-07-25 16:32:04 +02:00
parent 5f109c5d6c
commit c217b33c45

View file

@ -609,7 +609,7 @@ class UnitOfWork implements PropertyChangedListener
$idValue = $idGen->generate($this->em, $entity); $idValue = $idGen->generate($this->em, $entity);
if ( ! $idGen instanceof \Doctrine\ORM\Id\AssignedGenerator) { if ( ! $idGen instanceof \Doctrine\ORM\Id\AssignedGenerator) {
$this->entityIdentifiers[$oid] = array($class->identifier[0] => $idValue); $this->entityIdentifiers[$oid] = array($class->identifier[0] => $idValue);
$class->setIdentifierValues($entity, $idValue); $class->setIdentifierValues($entity, $this->entityIdentifiers[$oid]);
} else { } else {
$this->entityIdentifiers[$oid] = $idValue; $this->entityIdentifiers[$oid] = $idValue;
} }