1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/models/Element.php

13 lines
361 B
PHP

<?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');
}
}