Skip to content

Commit 81914fa

Browse files
author
Valentin Clavreul
committed
Fix cloning did not correctly apply all previous values
1 parent dff65df commit 81914fa

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Entity/AbstractData.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,7 @@ public function __clone()
874874
$this->__construct($this->getFamily());
875875

876876
foreach ($newValues as $newValue) {
877-
$this->values->add($newValue);
878-
$newValue->setData($this);
877+
$this->addValue($newValue);
879878
}
880879
}
881880

Entity/AbstractValue.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,6 @@ public function __clone()
560560
{
561561
$this->id = null;
562562
$attribute = $this->getAttribute();
563-
if ($this->dataValue && $attribute->getType()->isEmbedded()) {
564-
$this->dataValue = clone $this->dataValue;
565-
}
566563
}
567564

568565
/**

0 commit comments

Comments
 (0)