1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests_old/models/NestTest.php

20 lines
1008 B
PHP

<?php
class NestTest extends Doctrine_Entity
{
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));
}
}