From e4d4a29bddcbf211ad3f8f2f133d5ad1f7980063 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sun, 25 Jan 2015 13:02:28 +1100 Subject: [PATCH] withDeferred() will add constraints for us --- modules/backend/behaviors/RelationController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); + } }); /*