Skip to content

Commit

Permalink
Fixed merging issue with sequence identifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
romanb committed Aug 7, 2010
1 parent 35af982 commit 29bf4ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Doctrine/ORM/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,9 @@ private function doMerge($entity, array &$visited, $prevManagedCopy = null, $ass
// Merge state of $entity into existing (managed) entity
foreach ($class->reflFields as $name => $prop) {
if ( ! isset($class->associationMappings[$name])) {
$prop->setValue($managedCopy, $prop->getValue($entity));
if ( ! $class->isIdentifier($name)) {
$prop->setValue($managedCopy, $prop->getValue($entity));
}
} else {
$assoc2 = $class->associationMappings[$name];
if ($assoc2->isOneToOne()) {
Expand Down

0 comments on commit 29bf4ad

Please sign in to comment.