1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests_old/models/Task.php

10 lines
426 B
PHP

<?php
class Task extends Doctrine_Entity {
public static function initMetadata($class) {
$class->setColumn('name', 'string',100);
$class->setColumn('parent_id', 'integer');
$class->hasMany('Resource as ResourceAlias', array('local' => 'task_id', 'foreign' => 'resource_id', 'refClass' => 'Assignment'));
$class->hasMany('Task as Subtask', array('local' => 'id', 'foreign' => 'parent_id'));
}
}