Commit deferred data when creating/updating a pivot table.

This commit is contained in:
myst6re 2015-12-05 14:56:23 +01:00 committed by Samuel Georges
parent 1643cf69b9
commit 55bceba32c

View File

@ -1176,7 +1176,7 @@ class RelationController extends ControllerBehavior
foreach ($hyrdatedModels as $hydratedModel) {
$modelsToSave = $this->prepareModelsToSave($hydratedModel, $saveData);
foreach ($modelsToSave as $modelToSave) {
$modelToSave->save();
$modelToSave->save(null, $this->pivotWidget->getSessionKey());
}
}
});
@ -1194,7 +1194,7 @@ class RelationController extends ControllerBehavior
$modelsToSave = $this->prepareModelsToSave($hydratedModel, $saveData);
foreach ($modelsToSave as $modelToSave) {
$modelToSave->save();
$modelToSave->save(null, $this->pivotWidget->getSessionKey());
}
return ['#'.$this->relationGetId('view') => $this->relationRenderView()];