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
		]);
	}