2012-06-25 00:43:37 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace DataObjectTest;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Right now this is only used in DataListTest, but extending it to DataObjectTest in the future would make sense.
|
|
|
|
* Note that it was deliberated named to include "\N" to try and trip bad code up.
|
|
|
|
*/
|
2013-07-10 02:44:24 +02:00
|
|
|
class NamespacedClass extends \DataObject implements \TestOnly {
|
2013-03-21 19:48:54 +01:00
|
|
|
private static $db = array(
|
2012-06-25 00:43:37 +02:00
|
|
|
'Name' => 'Varchar',
|
|
|
|
);
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-07-10 02:44:24 +02:00
|
|
|
private static $has_many = array(
|
|
|
|
'Relations' => 'DataObjectTest\RelationClass'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
class RelationClass extends \DataObject implements \TestOnly {
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-07-10 02:44:24 +02:00
|
|
|
private static $db = array(
|
|
|
|
'Title' => 'Varchar'
|
|
|
|
);
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2013-07-10 02:44:24 +02:00
|
|
|
private static $has_one = array(
|
|
|
|
'Parent' => 'DataObject'
|
|
|
|
);
|
2012-06-25 00:43:37 +02:00
|
|
|
}
|