1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/models/Element.php

13 lines
361 B
PHP
Raw Normal View History

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