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