propelorm/Propel — Issue #212: Problems with many-to-many relationship on same table
Author: scp
Created: 2011-12-02 13:19:48+00:00
State: open

Propel references methods that it doesn't create...seems like a bug, but perhaps am doing something wrong?

then:

$user = new User();
$user->setEmail('foo@bar.com');
$user->save();

$friend = new User();
$friend->setEmail('foo2@bar.com');
$friend->save();

$user->addUserRelatedByUserId($user);

-- Call to undefined method: addUserFriend
in /vendor/propel/runtime/lib/om/BaseObject.php at line 400

2
at BaseObject ->__call ('addUserFriend', array(object(UserFriend)))
in Model/om/BaseUser.php at line 2610
3
at User ->addUserFriend (object(UserFriend))
in Model/om/BaseUser.php at line 2610
4
at BaseUser ->doAddUserRelatedByUserId (object(User))
in Model/om/BaseUser.php at line 2597
5
at BaseUser ->addUserRelatedByUserId (object(User))
in mycode.php at line 678