Rec2.php 340 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?php
class Rec2  extends Doctrine_Record
{
    public function setTableDefinition()
    {
        $this->hasColumn('user_id', 'integer', 10, array (  'unique' => true,));
        $this->hasColumn('address', 'string', 150, array ());
    }

    public function setUp()
    {
        $this->ownsOne('Rec1 as User', 'Rec2.user_id');
    }

}