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