Commit f23b69f6 authored by mahono's avatar mahono

fixed small bug in the many2many example

parent c5291aed
...@@ -161,9 +161,10 @@ class User extends Doctrine_Record ...@@ -161,9 +161,10 @@ class User extends Doctrine_Record
} }
} }
class Group extends Doctrine_Record { class Group extends Doctrine_Record
{
public function setUp() { public function setUp() {
$this->hasMany('Group', array('local' => 'group_id', $this->hasMany('User', array('local' => 'group_id',
'foreign' => 'user_id', 'foreign' => 'user_id',
// the following line is needed in many-to-many relations! // the following line is needed in many-to-many relations!
'refClass' => 'GroupUser')); 'refClass' => 'GroupUser'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment