hasAndBelongsToMany only working one way
- by Cameron
In my application I have users that are able to be friends with other users.
This is controlled with a users table and a friends_users table.
The friends_users table has the following columns: id, user_id, friend_id, status
And the model User looks like:
public $hasAndBelongsToMany = array(
'Friend'=>array(
'className' …