From f23b69f6dc8ab822f6604d3ca812a1ee0c40bbfe Mon Sep 17 00:00:00 2001 From: mahono Date: Fri, 15 Jun 2007 14:34:42 +0000 Subject: [PATCH] fixed small bug in the many2many example --- manual/new/docs/en/mapping-relations.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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);