I have a Thread modeal with associated models ForumUser and
ForumCategory:

        var $hasOne = array('ForumUser' =>
                        array('className' => 'ForumUser',
                                'conditions' => '',
                                'order' => '',
                                'dependent' => FALSE,
                                'foreignKey' => 'id'),
                        'ForumCategory' =>
                        array('className' => 'ForumCategory',
                                'conditions' => '',
                                'order' => '',
                                'dependent' => FALSE,
                                'foreignKey' => 'id')
                        );

The ForumUser is related by author_id (in the Thread table) and the
ForumCategory is related to category_id (in the Thread table). Even
with a belongs to and specifying a different foreign key it always
uses 'id' as its association.

For ForumUser

        var $belongsTo = array('Thread' =>
                        array('className' => 'Thread',
                                'conditions' => '',
                                'order' => '',
                                'foreignKey' => 'user_id')
                        );

For ForumCategory

        var $belongsTo = array('Thread' =>
                        array('className' => 'Thread',
                                'conditions' => '',
                                'order' => '',
                                'foreignKey' => 'category_id')
                        );

Please help me so I can continue development. Thanks.
--~--~---------~--~----~------------~-------~--~----~
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