silverstripe-framework/tests/php/ORM/ManyManyListTest/ExtraFieldsObject.php
2017-06-28 18:59:08 +01:00

31 lines
736 B
PHP

<?php
namespace SilverStripe\ORM\Tests\ManyManyListTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataObject;
class ExtraFieldsObject extends DataObject implements TestOnly
{
private static $table_name = 'ManyManyListTest_ExtraFields';
private static $many_many = array(
'Clients' => ExtraFieldsObject::class,
'Products' => Product::class,
);
private static $belongs_many_many = array(
'WorksWith' => ExtraFieldsObject::class
);
private static $many_many_extraFields = array(
'Clients' => array(
'Reference' => 'Varchar',
'Worth' => 'Money'
),
'Products' => array(
'Reference' => 'Varchar',
),
);
}