code: private function createAliasedRelation($field, Relation $relation)
      {
          if ($relation instanceof OneToOneRelation) {
              return new OneToOneRelation($field);
          } elseif ($relation instanceof OneToManyRelation) {
              return new OneToManyRelation($field);
          }
      }
docs: @param string   $field
  @param Relation $relation
  
  @return Relation