1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/tests_old/models/NestTest.php
2008-02-08 17:41:01 +00:00

20 lines
1008 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));
}
}