Commit deferred bindings on model created with RelationController (#3843)

Fixes #3829. Credit to @iotch. Tested by the fantastic Octodock provided by @petehalverson
This commit is contained in:
Kanstantsin 2018-10-04 17:35:30 +03:00 committed by Luke Towers
parent 813721edf1
commit 69a26aa8f2

View File

@ -1032,7 +1032,7 @@ class RelationController extends ControllerBehavior
* Has one relations will save as part of the add() call.
*/
if ($this->deferredBinding || $this->relationType != 'hasOne') {
$newModel->save();
$newModel->save(null, $this->manageWidget->getSessionKey());
}
$this->relationObject->add($newModel, $sessionKey);