protected function joinBelongsToRelation(Relations\BelongsTo $relation, $type)
{
$table = $relation->getRelated()->getTable();
$foreignKey = $relation->getQualifiedForeignKey();
$localKey = $relation->getQualifiedOtherKeyName();
$this->query->join($table, $foreignKey, '=', $localKey, $type);
}