diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index f7b28167a..3a0728463 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -928,12 +928,12 @@ class RelationController extends ControllerBehavior $this->controller->relationExtendQuery($query, $this->field); $this->relationObject->setQuery($query); - if ($this->model->exists) { - $this->relationObject->addConstraints(); - } if ($sessionKey = $this->relationGetSessionKey()) { $this->relationObject->withDeferred($sessionKey); } + elseif ($this->model->exists) { + $this->relationObject->addConstraints(); + } }); /*