From b5f88af1f05012430565e5755984b4003cf58138 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 22 Jun 2015 12:39:40 +1000 Subject: [PATCH] Add extension hook for getManyManyComponents() Call extension after DataModel is set --- model/DataObject.php | 3 +++ 1 file changed, 3 insertions(+) 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.