lib/Doctrine/ORM/QueryBuilder.php
private function findRootAlias($alias, $parentAlias)
    {
        $rootAlias = null;

        if (in_array($parentAlias, $this->getRootAliases(), true)) {
            $rootAlias = $parentAlias;
        } elseif (isset($this->joinRootAliases[$parentAlias])) {
            $rootAlias = $this->joinRootAliases[$parentAlias];
        } else {
            // Should never happen with correct joining order. Might be
            // thoughtful to throw exception instead.
            $rootAlias = $this->getRootAlias();
        }

        $this->joinRootAliases[$alias] = $rootAlias;

        return $rootAlias;
    }
private function findRootAlias($alias, $parentAlias)
    {
        $rootAlias = null;

        if (in_array($parentAlias, $this->getRootAliases(), true)) {
            $rootAlias = $parentAlias;
        } elseif (isset($this->joinRootAliases[$parentAlias])) {
            $rootAlias = $this->joinRootAliases[$parentAlias];
        } else {
            // Should never happen with correct joining order. Might be
            // thoughtful to throw exception instead.
            $rootAlias = $this->getRootAlias();
        }

        $this->joinRootAliases[$alias] = $rootAlias;

        return $rootAlias;
    }
private function findRootAlias ( $ alias , $ parentAlias ) { $ rootAlias = null ; if ( in_array ( $ parentAlias , $ this -> getRootAliases ( ) , true ) ) { $ rootAlias = $ parentAlias ; } elseif ( isset ( $ this -> joinRootAliases [ $ parentAlias ] ) ) { $ rootAlias = $ this -> joinRootAliases [ $ parentAlias ] ; } else { // Should never happen with correct joining order. Might be // thoughtful to throw exception instead. $ rootAlias = $ this -> getRootAlias ( ) ; } $ this -> joinRootAliases [ $ alias ] = $ rootAlias ; return $ rootAlias ; }
Finds the root entity alias of the joined entity.

@param string $alias       The alias of the new join entity
@param string $parentAlias The parent entity alias of the join relationship

@return string
Finds the root entity alias of the joined entity .