public function join($context, $rel, $fromAlias = null, $toAlias = null, $constraints = []) {
		$model = $rel->to();

		if ($fromAlias === null) {
			$fromAlias = $context->alias();
		}
		if ($toAlias === null) {
			$toAlias = $context->alias(null, $rel->name());
		}
		if (!is_object($constraints)) {
			$constraints = $this->on($rel, $fromAlias, $toAlias, $constraints);
		} else {
			$constraints = (array) $constraints;
		}

		$context->joins($toAlias, compact('constraints', 'model') + [
			'mode' => 'LEFT',
			'alias' => $toAlias
		]);
	}
public function join($context, $rel, $fromAlias = null, $toAlias = null, $constraints = []) {
		$model = $rel->to();

		if ($fromAlias === null) {
			$fromAlias = $context->alias();
		}
		if ($toAlias === null) {
			$toAlias = $context->alias(null, $rel->name());
		}
		if (!is_object($constraints)) {
			$constraints = $this->on($rel, $fromAlias, $toAlias, $constraints);
		} else {
			$constraints = (array) $constraints;
		}

		$context->joins($toAlias, compact('constraints', 'model') + [
			'mode' => 'LEFT',
			'alias' => $toAlias
		]);
	}
public function join ( $ context , $ rel , $ fromAlias = null , $ toAlias = null , $ constraints = [ ] ) { $ model = $ rel -> to ( ) ; if ( $ fromAlias === null ) { $ fromAlias = $ context -> alias ( ) ; } if ( $ toAlias === null ) { $ toAlias = $ context -> alias ( null , $ rel -> name ( ) ) ; } if ( ! is_object ( $ constraints ) ) { $ constraints = $ this -> on ( $ rel , $ fromAlias , $ toAlias , $ constraints ) ; } else { $ constraints = ( array ) $ constraints ; } $ context -> joins ( $ toAlias , compact ( 'constraints' , 'model' ) + [ 'mode' => 'LEFT' , 'alias' => $ toAlias ] ) ; }
Set a query's join according a Relationship.

@param object $context A Query instance
@param object $rel A Relationship instance
@param string $fromAlias Set a specific alias for the `'from'` `Model`.
@param string $toAlias Set a specific alias for `'to'` `Model`.
@param mixed $constraints If `$constraints` is an array, it will be merged to defaults
constraints. If `$constraints` is an object, defaults won't be merged.
Set a query s join according a Relationship .