Skip to content

Commit

Permalink
Fix cloning did not correctly apply all previous values
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Clavreul committed Jan 22, 2020
1 parent dff65df commit 81914fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions Entity/AbstractData.php
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,7 @@ public function __clone()
$this->__construct($this->getFamily());

foreach ($newValues as $newValue) {
$this->values->add($newValue);
$newValue->setData($this);
$this->addValue($newValue);
}
}

Expand Down
3 changes: 0 additions & 3 deletions Entity/AbstractValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,6 @@ public function __clone()
{
$this->id = null;
$attribute = $this->getAttribute();
if ($this->dataValue && $attribute->getType()->isEmbedded()) {
$this->dataValue = clone $this->dataValue;
}
}

/**
Expand Down

0 comments on commit 81914fa

Please sign in to comment.