2007-09-02 18:24:49 +04:00
|
|
|
<?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()
|
|
|
|
{
|
2008-01-23 11:04:54 +03:00
|
|
|
$this->hasOne('Rec1 as User', 'Rec2.user_id');
|
2007-09-02 18:24:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|