silverstripe-framework/tests/php/ORM/ManyManyListTest/Product.php

27 lines
597 B
PHP
Raw Permalink Normal View History

2016-10-14 03:30:05 +02:00
<?php
namespace SilverStripe\ORM\Tests\ManyManyListTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataObject;
class Product extends DataObject implements TestOnly
{
private static $table_name = 'ManyManyListTest_Product';
2016-10-14 03:30:05 +02:00
private static $db = [
'Title' => 'Varchar'
];
2016-10-14 03:30:05 +02:00
private static $many_many = [
'RelatedProducts' => Product::class
];
2016-10-14 03:30:05 +02:00
private static $belongs_many_many = [
'RelatedTo' => Product::class,
'Categories' => Category::class
];
2017-06-28 19:23:38 +02:00
private static $default_sort = '"Title" IS NOT NULL ASC, "Title" ASC';
2016-10-14 03:30:05 +02:00
}