Like this?:

Message HasOne User (From)
Message HasOne ToUser (To)
Message HasOne CcUser (Copy)

In message.php:

        var $belongsTo = array(
                'User' => array(
                        'className' => 'User',
                        'foreignKey' => 'user_id',
                        'conditions' => '',
                        'fields' => '',
                        'order' => ''
                ),
                'ToUser' => array(
                        'className' => 'User',
                        'foreignKey' => 'reciever_user_id',
                        'conditions' => '',
                        'fields' => '',
                        'order' => ''
                ),
                'CcUser' => array(
                        'className' => 'User',
                        'foreignKey' => 'cc_user_id',
                        'conditions' => '',
                        'fields' => '',
                        'order' => ''
                )
        );

Else, maybe polymorphic behavior might help. Not sure what you want to
achieve.

On May 15, 6:36 pm, byqsri <marco.rizze...@gmail.com> wrote:
> I haven't understand .
> Can you make me and example?
> Many Thanks
>
> On 15 Mag, 17:56, AD7six <andydawso...@gmail.com> wrote:
>
> > On May 15, 5:32 pm, "marco.rizze...@gmail.com"
>
> > <marco.rizze...@gmail.com> wrote:
> > > Hi
> > > I have three model that have a triple relation between them.
> > > How can I manage this triple relation between Model in CAKEPHP?
>
> > via belongsTo, hasMany and a model for each table - the usual way.
>
> > hth,
>
> > AD
--~--~---------~--~----~------------~-------~--~----~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to