Suppose you've got books and authors. For each book you can define a
main author and an assistant author. Which relational mapping do I use?

'book' hasOne 'mainauthor' AND 'book' hasOne 'assistantauthor'

   var $hasOne = array('Author' =>
                       array('className'    => 'Author',
                             'dependent'    =>  false,
                              'foreignKey'   => 'mainauthor_id'
                        );

    var $hasOne = array('Author' =>
                        array('className'    => 'Author',
                              'dependent'    =>  false,
                              'foreignKey'   => 'assistantauthor_id'
                        );

The above code obviously doesn't work. But how do I combine those?

Grtz, Barton


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