I have a model that has a belongs to like

    var $belongsTo = array(
        'Owner'            =>    array('className'=>'Client','foreignKey'=>'owner_id'),
        'Photographer'    =>    array('className'=>'Client','foreignKey'=>'photographer_id'),
        'Billto'        =>    array('className'=>'Client','foreignKey'=>'billto_id'),
        'Client'        =>    array('className'=>'Client','foreignKey'=>'client_id'));

4 parts all connected to same model  works fine for me



On 6/14/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
Is anyone building an application with an internal messaging system?

I am trying to build a basic internal messaging system that sort of mimicks the basic functionality of email (i.e. send/reply/view) between two users only.  No need to edit, delete, forward, etc.. as I am addressing this with auto archiving and providing an alternate core communications system as well.  My idea here is only the basics.

I am trying to figure out the models for this since both the sender and the receiver will both be of model 'User'.  The message will need an id pointing to both users.

I have seen example code where one user is linked to the message using a 'user_id' column and the other user is linked using a 'fromid' column.  How well does this work?

Any help / hints / ideas reguarding the model relationships are appreciated.  I am still learning the cake way, sorry if I am just making this too hard.

Thanks.




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to