withDeferred() will add constraints for us
This commit is contained in:
parent
b58666b4a0
commit
e4d4a29bdd
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue