/** * First step. Step into the component path and create all * join relations beginning by the startRelation * @param string $startRelation * @param Doctrine_Query_Abstract $query * @return string The new alias for the where conditions */ private function createJoins($startRelation, Doctrine_Query_Abstract $query) { $path = explode('.', $this->componentPath); $startComponent = array_shift($path); $query->innerJoin($startRelation . '.' . $startComponent . ' ' . $this->genAlias()); foreach ($path as $sub) { $query->innerJoin($this->lastAlias . '.' . $sub . ' ' . $this->genAlias()); } return $this->lastAlias; }