diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index 27591bb79..98818caf0 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -1243,10 +1243,10 @@ class RelationController extends ControllerBehavior * Save data to models */ $foreignKeyName = $this->relationModel->getQualifiedKeyName(); - $hyrdatedModels = $this->relationObject->whereIn($foreignKeyName, $foreignIds)->get(); + $hydratedModels = $this->relationObject->whereIn($foreignKeyName, $foreignIds)->get(); $saveData = $this->pivotWidget->getSaveData(); - foreach ($hyrdatedModels as $hydratedModel) { + foreach ($hydratedModels as $hydratedModel) { $modelsToSave = $this->prepareModelsToSave($hydratedModel, $saveData); foreach ($modelsToSave as $modelToSave) { $modelToSave->save(null, $this->pivotWidget->getSessionKey());