public function asSeparateTable(string $tableName): SubClassDefinitionDefiner
    {
        return new SubClassDefinitionDefiner(
            $this->orm,
            $this->parentDefinition,
            function (MapperDefinition $subClassDefinition) use ($tableName) {

                call_user_func(
                    $this->callback,
                    function (Table $parentTable) use ($subClassDefinition, $tableName) {
                        $subClassDefinition->idToPrimaryKey($parentTable->getPrimaryKeyColumnName());
                        $finalizedSubClassDefinition = $subClassDefinition->finalize($tableName);

                        return new JoinedSubClassObjectMapping(
                            $parentTable,
                            $finalizedSubClassDefinition
                        );
                    },
                    $subClassDefinition
                );
            }
        );
    }
public function asSeparateTable(string $tableName): SubClassDefinitionDefiner
    {
        return new SubClassDefinitionDefiner(
            $this->orm,
            $this->parentDefinition,
            function (MapperDefinition $subClassDefinition) use ($tableName) {

                call_user_func(
                    $this->callback,
                    function (Table $parentTable) use ($subClassDefinition, $tableName) {
                        $subClassDefinition->idToPrimaryKey($parentTable->getPrimaryKeyColumnName());
                        $finalizedSubClassDefinition = $subClassDefinition->finalize($tableName);

                        return new JoinedSubClassObjectMapping(
                            $parentTable,
                            $finalizedSubClassDefinition
                        );
                    },
                    $subClassDefinition
                );
            }
        );
    }
public function asSeparateTable ( string $ tableName ) : SubClassDefinitionDefiner { return new SubClassDefinitionDefiner ( $ this -> orm , $ this -> parentDefinition , function ( MapperDefinition $ subClassDefinition ) use ( $ tableName ) { call_user_func ( $ this -> callback , function ( Table $ parentTable ) use ( $ subClassDefinition , $ tableName ) { $ subClassDefinition -> idToPrimaryKey ( $ parentTable -> getPrimaryKeyColumnName ( ) ) ; $ finalizedSubClassDefinition = $ subClassDefinition -> finalize ( $ tableName ) ; return new JoinedSubClassObjectMapping ( $ parentTable , $ finalizedSubClassDefinition ) ; } , $ subClassDefinition ) ; } ) ; }
Defines the subclass to be stored in a separate table
with the primary key of that table as a foreign key referencing
the parent table primary key.

This is the using the class table inheritance pattern.

**Example:**
<code>
$map->type(Player::class);
$map->toTable('players');

$map->idToPrimaryKey('id');
$map->property('name')->to('name')->asVarchar(255);

$map->subclass()->asSeparateTable('footballers')->define(function (MapperDefinition $map) {
$map->type(Footballer::class);
$map->property('club')->to('club')->asVarchar(255);
});

$map->subclass()->asSeparateTable('cricketers')->define(function (MapperDefinition $map) {
$map->type(Cricketer::class);
$map->property('battingAverage')->to('batting_average')->asInt();

$map->subclass()->asSeparateTable('bowlers')->define(function (MapperDefinition $map) {
$map->type(Bowler::class);
$map->property('bowlingAverage')->to('bowling_average')->asInt();
});
});
</code>

**This will create a schema as such:**
<code>
| players                   |
|---------|-----------------|
| id      | INT PRIMARY KEY |
| name    | VARCHAR(255)    |


| footballers                                           |
|-------------|-----------------------------------------|
| id          | INT PRIMARY KEY REFERENCES (players.id) |
| club        | VARCHAR(255)                            |


| cricketers                                                |
|-----------------|-----------------------------------------|
| id              | INT PRIMARY KEY REFERENCES (players.id) |
| batting_average | INT                                     |


| bowlers                                                      |
|-----------------|--------------------------------------------|
| id              | INT PRIMARY KEY REFERENCES (cricketers.id) |
| bowling_average | INT                                        |
</code>

@param string $tableName

@return SubClassDefinitionDefiner
Defines the subclass to be stored in a separate table with the primary key of that table as a foreign key referencing the parent table primary key .