1
0
mirror of synced 2025-01-17 22:11:41 +03:00

fixed small bug in the many2many example

This commit is contained in:
mahono 2007-06-15 14:34:42 +00:00
parent c5291aedd7
commit f23b69f6dc

View File

@ -161,12 +161,13 @@ class User extends Doctrine_Record
}
}
class Group extends Doctrine_Record {
class Group extends Doctrine_Record
{
public function setUp() {
$this->hasMany('Group', array('local' => 'group_id',
'foreign' => 'user_id',
$this->hasMany('User', array('local' => 'group_id',
'foreign' => 'user_id',
// the following line is needed in many-to-many relations!
'refClass' => 'GroupUser'));
'refClass' => 'GroupUser'));
}
public function setTableDefinition() {
$this->hasColumn('name', 'string', 30);