public function to(string $entityType, string $tableName = null) : RelationDefiner
    {
        return new RelationDefiner($this->callback, function () use ($entityType, $tableName) {
            return $this->orm->getEntityMapper($entityType, $tableName);
        });
    }
public function to(string $entityType, string $tableName = null) : RelationDefiner
    {
        return new RelationDefiner($this->callback, function () use ($entityType, $tableName) {
            return $this->orm->getEntityMapper($entityType, $tableName);
        });
    }
public function to ( string $ entityType , string $ tableName = null ) : RelationDefiner { return new RelationDefiner ( $ this -> callback , function ( ) use ( $ entityType , $ tableName ) { return $ this -> orm -> getEntityMapper ( $ entityType , $ tableName ) ; } ) ; }
Sets the relation to use the mapper of the
supplied entity type.

If the related entity is mapped to multiple tables
the table name must be specified.

@param string      $entityType
@param string|null $tableName

@return RelationDefiner
Sets the relation to use the mapper of the supplied entity type .