Created
May 2, 2016 08:46
-
-
Save maximecolin/75cbe517de5ab62a0bcac8bf457c92b7 to your computer and use it in GitHub Desktop.
Revisions
-
maximecolin created this gist
May 2, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ /** * Has join * * @param string $root * @param string $relation * * @return bool */ private function hasJoin($root, $relation) { $parts = $this->getDQLPart('join'); if (isset($parts[$root])) { foreach ($parts[$root] as $join) { if ($join instanceof Join && $join->getJoin() === sprintf('%s.%s', $root, $relation)) { return true; } } } return false; }