Hi, I'm on a project that users can add other users as friends, families, or block them. So I've set up some habtm behaviors for that. The tables (friends, families, blocks) look very similar, all with (user_id, friend_id) or (user_id, family_id) as keys.
But when I save a data, like calling: $this->data['User']['id'] = 1; $this->data['HasAsFriend']['HasAsFriend'] = 2; $this->User->save($this->data); I'll have not only user1 adding user2 as friend, but also user2 adding user1 as friend. What's more, they're each other's families and user1 is blocking user2 too. (The data got inserted into families table and blocks table too.) I posted my user model relationships at http://bin.cakephp.org/view/241705085 I also tried the behavior at http://bakery.cakephp.org/articles/view/add-delete-habtm-behavior , but with the code: $this->User->habtmAdd('HasAsFriend', 1, 2); Also results the same as inserting into families table and blocks table. I'm troubled, I'm not sure why this is happening. Any clues is greatly appreciated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---