silverstripe-framework/tests/php/ORM/DataObjectTest/SubTeam.php

29 lines
598 B
PHP
Raw Normal View History

2016-10-14 03:30:05 +02:00
<?php
namespace SilverStripe\ORM\Tests\DataObjectTest;
use SilverStripe\Dev\TestOnly;
class SubTeam extends Team implements TestOnly
{
private static $table_name = 'DataObjectTest_SubTeam';
2016-10-14 03:30:05 +02:00
private static $db = array(
'SubclassDatabaseField' => 'Varchar'
);
2016-10-14 03:30:05 +02:00
private static $has_one = array(
"ParentTeam" => Team::class,
);
2016-10-14 03:30:05 +02:00
private static $many_many = array(
'FormerPlayers' => Player::class
);
2016-10-14 03:30:05 +02:00
private static $many_many_extraFields = array(
'FormerPlayers' => array(
'Position' => 'Varchar(100)'
)
);
2016-10-14 03:30:05 +02:00
}