diff --git a/model/DataObject.php b/model/DataObject.php index bf836bab8..67f180a50 100644 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -1771,7 +1771,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity $componentClass, $table, $componentField, $parentField, $this->manyManyExtraFieldsForComponent($componentName) ); + if($this->model) $result->setDataModel($this->model); + + $this->extend('updateManyManyComponents', $result); // If this is called on a singleton, then we return an 'orphaned relation' that can have the // foreignID set elsewhere.