2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\ORM\Tests\VersionedOwnershipTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\ORM\Tests\VersionedOwnershipTest;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Object which:
|
|
|
|
* - owns a has_one object
|
|
|
|
* - owns has_many objects
|
|
|
|
*/
|
|
|
|
class Subclass extends TestObject implements TestOnly
|
|
|
|
{
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $db = array(
|
|
|
|
'Description' => 'Text',
|
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $has_one = array(
|
|
|
|
'Related' => Related::class,
|
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $has_many = array(
|
|
|
|
'Banners' => RelatedMany::class,
|
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $table_name = 'VersionedOwnershipTest_Subclass';
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $owns = array(
|
|
|
|
'Related',
|
|
|
|
'Banners',
|
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|