I am having a problem with an HABTM that has a forth table involved. Here's
the break down

Individuals
AccountsTrailers
AccountsTrailersIndividuals

AccountHolders

AccountsTrailersIndividuals has a field account_holder_id so that I can
associate an individual with an accountstrailer

the error I get is as follows:

Model "AccountsTrailersIndividual" is not associated with model
"AccountHolder"

but I have the associations set up properly in the models. They follow for
reference

AccountHolder Model
    public $hasMany = array(
                'AccountsTrailersIndividual' => array(
                        'className' => 'AccountsTrailersIndividual',
                        'foreignKey' => 'account_holder_id',
                        'dependent' => false,
                        'conditions' => '',
                        'fields' => '',
                        'order' => '',
                        'limit' => '',
                        'offset' => '',
                        'exclusive' => '',
                        'finderQuery' => '',
                        'counterQuery' => ''
                )
        );

AccountsTrailersIndividual Model
    public $belongsTo = array(
                'Individual' => array(
                        'className' => 'Individual',
                        'foreignKey' => 'individual_id',
                        'conditions' => '',
                        'fields' => '',
                        'order' => ''
                ),
                'AccountsTrailer' => array(
                        'className' => 'AccountsTrailer',
                        'foreignKey' => 'accounts_trailer_id',
                        'conditions' => '',
                        'fields' => '',
                        'order' => ''
                ),
                'AccountHolder' => array(
                        'className' => 'AccountHolder',
                        'foreignKey' => 'account_holder_id',
                        'conditions' => '',
                        'fields' => '',
                        'order' => ''
                )
        );

What am I missing? Thanks for your help.
Jamie

--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/HABTM-relationship-tp5509633p5509633.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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