I'm trying since some days to write a personal message system for my project but i fail at the point where i have to make sure that a message can be send to more then one receiver. I don't get my models and associations correctly set.
That's my table structure: Message: id, subject, msgtext... Message_Users: id, message_id, receiver_id, sender_id User: id, username... Heres my MessageUser-Model http://bin.cakephp.org/view/132765364 Here is what $this- >paginate('MessagesUsers',array('MessagesUsers.receiver_id' => 1)); returns: http://bin.cakephp.org/view/1971519227 There 3 entries, all have sender_id 2 and message_id 1, but each has another receiver. The above model should now get the message thats addressed to me (receiver_id = 1) + all users in [Receivers] that got the message also. But i obviosly don't get all. Just one. Is my logic wrong? Is the model wrong!? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---