1
0
Fork 0
mirror of synced 2025-03-29 03:09:50 +03:00
doctrine2/tests_old/models/NestTest.php
2008-02-08 17:41:01 +00:00

19 lines
1,008 B
PHP

<?php
class NestTest extends Doctrine_Record
{
public static function initMetadata($class)
{
$class->setColumn('name', 'string');
$class->hasMany('NestTest as Parents', array('local' => 'child_id',
'refClass' => 'NestReference',
'foreign' => 'parent_id'));
$class->hasMany('NestTest as Children', array('local' => 'parent_id',
'refClass' => 'NestReference',
'foreign' => 'child_id'));
$class->hasMany('NestTest as Relatives', array('local' => 'child_id',
'refClass' => 'NestReference',
'foreign' => 'parent_id',
'equal' => true));
}
}