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

20 lines
466 B
PHP

<?php
class RelationTest extends Doctrine_Record
{
public function setTableDefinition()
{
$this->hasColumn('name', 'string', 200);
$this->hasColumn('child_id', 'integer');
}
}
class RelationTestChild extends RelationTest
{
public function setUp()
{
$this->hasOne('RelationTest as Parent', 'RelationTestChild.child_id');
$this->ownsMany('RelationTestChild as Children', 'RelationTestChild.child_id');
}
}