2006-07-23 21:08:06 +00:00
|
|
|
<?php
|
|
|
|
class Task extends Doctrine_Record {
|
|
|
|
public function setUp() {
|
2007-04-11 20:13:39 +00:00
|
|
|
$this->hasOne('Task as Parent','Task.parent_id');
|
|
|
|
$this->hasMany('Task as Subtask','Subtask.parent_id');
|
2006-07-23 21:08:06 +00:00
|
|
|
}
|
|
|
|
public function setTableDefinition() {
|
2007-04-11 20:13:39 +00:00
|
|
|
$this->hasColumn('name','string',100);
|
|
|
|
$this->hasColumn('parent_id','integer');
|
2006-07-23 21:08:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|