mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Commit deferred data when creating/updating a pivot table.
This commit is contained in:
parent
1643cf69b9
commit
55bceba32c
@ -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()];
|
||||
|
Loading…
x
Reference in New Issue
Block a user