public function withRelatedIdAs(string $column)
    {
        call_user_func($this->callback, function ($idString, Table $parentTable) use ($column) {
            $mapper = call_user_func($this->mapperLoader);

            return new ManyToManyRelation(
                    $idString,
                    $this->loadIds
                            ? new ToManyRelationIdentityReference($mapper, $this->bidirectionalRelationProperty)
                            : new ToManyRelationObjectReference($mapper, $this->bidirectionalRelationProperty),
                    $this->joinTableName,
                    $parentTable->getName(),
                    $parentTable->getPrimaryKeyColumn(),
                    $this->parentIdColumn,
                    $column
            );
        });
    }
public function withRelatedIdAs(string $column)
    {
        call_user_func($this->callback, function ($idString, Table $parentTable) use ($column) {
            $mapper = call_user_func($this->mapperLoader);

            return new ManyToManyRelation(
                    $idString,
                    $this->loadIds
                            ? new ToManyRelationIdentityReference($mapper, $this->bidirectionalRelationProperty)
                            : new ToManyRelationObjectReference($mapper, $this->bidirectionalRelationProperty),
                    $this->joinTableName,
                    $parentTable->getName(),
                    $parentTable->getPrimaryKeyColumn(),
                    $this->parentIdColumn,
                    $column
            );
        });
    }
public function withRelatedIdAs ( string $ column ) { call_user_func ( $ this -> callback , function ( $ idString , Table $ parentTable ) use ( $ column ) { $ mapper = call_user_func ( $ this -> mapperLoader ) ; return new ManyToManyRelation ( $ idString , $ this -> loadIds ? new ToManyRelationIdentityReference ( $ mapper , $ this -> bidirectionalRelationProperty ) : new ToManyRelationObjectReference ( $ mapper , $ this -> bidirectionalRelationProperty ) , $ this -> joinTableName , $ parentTable -> getName ( ) , $ parentTable -> getPrimaryKeyColumn ( ) , $ this -> parentIdColumn , $ column ) ; } ) ; }
Defines the column in the join table to map the related id to.

@param string $column

@return void
Defines the column in the join table to map the related id to .