framework/db/ar/CActiveFinder.php
public function buildQuery($query)
	{
		foreach($this->children as $child)
		{
			if($child->master!==null)
				$child->_joined=true;
			elseif($child->relation instanceof CHasOneRelation || $child->relation instanceof CBelongsToRelation
				|| $this->_finder->joinAll || $child->relation->together || (!$this->_finder->baseLimited && $child->relation->together===null))
			{
				$child->_joined=true;
				$query->join($child);
				$child->buildQuery($query);
			}
		}
	}
public function buildQuery($query)
	{
		foreach($this->children as $child)
		{
			if($child->master!==null)
				$child->_joined=true;
			elseif($child->relation instanceof CHasOneRelation || $child->relation instanceof CBelongsToRelation
				|| $this->_finder->joinAll || $child->relation->together || (!$this->_finder->baseLimited && $child->relation->together===null))
			{
				$child->_joined=true;
				$query->join($child);
				$child->buildQuery($query);
			}
		}
	}
public function buildQuery ( $ query ) { foreach ( $ this -> children as $ child ) { if ( $ child -> master !== null ) $ child -> _joined = true ; elseif ( $ child -> relation instanceof CHasOneRelation || $ child -> relation instanceof CBelongsToRelation || $ this -> _finder -> joinAll || $ child -> relation -> together || ( ! $ this -> _finder -> baseLimited && $ child -> relation -> together === null ) ) { $ child -> _joined = true ; $ query -> join ( $ child ) ; $ child -> buildQuery ( $ query ) ; } } }
Builds the join query with all descendant HAS_ONE and BELONGS_TO nodes.
@param CJoinQuery $query the query being built up
Builds the join query with all descendant HAS_ONE and BELONGS_TO nodes .