silverstripe-framework/tests/php/ORM/DataListTest/EagerLoadObject.php
2023-06-07 14:59:02 +12:00

42 lines
1.2 KiB
PHP

<?php
namespace SilverStripe\ORM\Tests\DataListTest;
use SilverStripe\ORM\DataObject;
use SilverStripe\Dev\TestOnly;
class EagerLoadObject extends DataObject implements TestOnly
{
private static $table_name = 'EagerLoadObject';
private static $db = [
'Title' => 'Varchar'
];
private static $has_one = [
'HasOneEagerLoadObject' => HasOneEagerLoadObject::class
];
private static $belongs_to = [
'BelongsToEagerLoadObject' => BelongsToEagerLoadObject::class
];
private static $has_many = [
'HasManyEagerLoadObjects' => HasManyEagerLoadObject::class
];
private static $many_many = [
'ManyManyEagerLoadObjects' => ManyManyEagerLoadObject::class,
'ManyManyThroughEagerLoadObjects' => [
'through' => EagerLoadObjectManyManyThroughEagerLoadObject::class,
'from' => 'EagerLoadObject',
'to' => 'ManyManyThroughEagerLoadObject',
],
'MixedManyManyEagerLoadObjects' => MixedManyManyEagerLoadObject::class,
];
private static $belongs_many_many = [
'BelongsManyManyEagerLoadObjects' => BelongsManyManyEagerLoadObject::class,
];
}