1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/models/TreeLeaf.php

15 lines
371 B
PHP
Raw Normal View History

<?php
class TreeLeaf extends Doctrine_Record
{
public function setTableDefinition()
{
$this->hasColumn('name', 'string');
$this->hasColumn('parent_id', 'integer');
}
public function setUp()
{
$this->hasOne('TreeLeaf as Parent', 'TreeLeaf.parent_id');
$this->hasMany('TreeLeaf as Children', 'TreeLeaf.parent_id');
}
}