This commit is contained in:
Samuel Georges 2015-02-28 23:43:06 +11:00
parent ce77c0f89e
commit 625030f03e
1 changed files with 3 additions and 0 deletions

View File

@ -970,6 +970,9 @@ class RelationController extends ControllerBehavior
$this->relationObject->addConstraints(); $this->relationObject->addConstraints();
} }
/*
* Allows pivot data to enter the fray
*/
if ($this->relationType == 'belongsToMany') { if ($this->relationType == 'belongsToMany') {
$this->relationObject->setQuery($query->getQuery()); $this->relationObject->setQuery($query->getQuery());
return $this->relationObject; return $this->relationObject;