2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\ORM\Tests\DataObjectTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\ORM\DataObject;
|
2019-05-06 02:33:23 +02:00
|
|
|
use SilverStripe\ORM\FieldType\DBVarchar;
|
2016-10-14 03:30:05 +02:00
|
|
|
|
|
|
|
class Fan extends DataObject implements TestOnly
|
|
|
|
{
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $table_name = 'DataObjectTest_Fan';
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $db = array(
|
|
|
|
'Name' => 'Varchar(255)',
|
2019-05-06 02:33:23 +02:00
|
|
|
'Email' => DBVarchar::class
|
2016-12-16 05:34:21 +01:00
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $has_one = array(
|
|
|
|
'Favourite' => DataObject::class, // Polymorphic relation
|
|
|
|
'SecondFavourite' => DataObject::class
|
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|