You want to know how to set up your assocations?  Something like the
following should do:

User:
var $hasMany = array(
        'SentMessage' => array( 'className' => 'Message', 'foreignKey' =>
'sender_id' ),
        'ReceivedMessage' => array( 'className' => 'Message', 'foreignKey' =>
'recipient_id' ),
);


Message:
var $belongsTo = array(
        'Sender' => array('className'  => 'User', 'foreignKey' =>
'sender_id' ),
        'Recipient' => array('className' => 'User', 'foreignKey' =>
'recipient_id' )
);


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to