diff --git a/manual/new/docs/en/mapping-relations.txt b/manual/new/docs/en/mapping-relations.txt index 3bf4ed7cd..98e83ad2e 100644 --- a/manual/new/docs/en/mapping-relations.txt +++ b/manual/new/docs/en/mapping-relations.txt @@ -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);