2016-10-14 14:30:05 +13:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\ORM\Tests\DataObjectSchemaTest;
|
|
|
|
|
2023-12-12 10:18:25 +13:00
|
|
|
use SilverStripe\ORM\DataObject;
|
|
|
|
use SilverStripe\ORM\DataObjectSchema;
|
|
|
|
|
2016-10-14 14:30:05 +13:00
|
|
|
class WithRelation extends NoFields
|
|
|
|
{
|
2016-12-16 17:34:21 +13:00
|
|
|
private static $table_name = 'DataObjectSchemaTest_WithRelation';
|
2016-10-14 14:30:05 +13:00
|
|
|
|
2020-04-20 18:58:09 +01:00
|
|
|
private static $has_one = [
|
2023-12-12 10:18:25 +13:00
|
|
|
'Relation' => HasFields::class,
|
|
|
|
'PolymorphicRelation' => DataObject::class,
|
|
|
|
'MultiRelationalRelation' => [
|
|
|
|
'class' => DataObject::class,
|
|
|
|
DataObjectSchema::HAS_ONE_MULTI_RELATIONAL => true,
|
|
|
|
],
|
|
|
|
'ArraySyntaxRelation' => [
|
|
|
|
'class' => HasFields::class,
|
|
|
|
],
|
2020-04-20 18:58:09 +01:00
|
|
|
];
|
2016-10-14 14:30:05 +13:00
|
|
|
}
|