diff --git a/core/model/ComponentSet.php b/core/model/ComponentSet.php index 412667880..a6bdb1bf2 100755 --- a/core/model/ComponentSet.php +++ b/core/model/ComponentSet.php @@ -124,6 +124,7 @@ class ComponentSet extends DataObjectSet { protected function loadChildIntoDatabase($item, $extraFields = null) { if($this->type == '1-to-many') { $child = DataObject::get_by_id($this->childClass,$item->ID); + if (!$child) $child = $item; $joinField = $this->joinField; $child->$joinField = $this->ownerObj->ID; $child->write();