1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/manual/codes/Object relational mapping - Relations - Foreign key associations - Tree structure.php
2007-02-23 23:02:59 +00:00

13 lines
365 B
PHP

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