2006-07-24 01:08:06 +04:00
|
|
|
<?php
|
|
|
|
class User extends Doctrine_Record {
|
|
|
|
public function setUp() {
|
2007-04-12 00:13:39 +04:00
|
|
|
$this->hasMany('User as Friend','UserReference.user_id-user_id2');
|
2006-07-24 01:08:06 +04:00
|
|
|
}
|
|
|
|
public function setTableDefinition() {
|
2007-04-12 00:13:39 +04:00
|
|
|
$this->hasColumn('name','string',30);
|
2006-07-24 01:08:06 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
class UserReference extends Doctrine_Record {
|
|
|
|
public function setTableDefinition() {
|
2007-04-12 00:13:39 +04:00
|
|
|
$this->hasColumn('user_id','integer');
|
|
|
|
$this->hasColumn('user_id2','integer');
|
2006-07-24 01:08:06 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|