What happens if you just use $application['Clients']['tax_rate'] in
your view instead of preceding it with your main model?

On Sep 21, 8:42 am, "#2Will" <[email protected]> wrote:
> Hi, Im getting in a muddle with associations.
>
> I have tables
>
> clients, tax_affiliates and applications
>
> in my applications view, i want to show rate, which is stored in the
> client table.
>
> $application['TaxAffiliates']['Clients']['tax_rate']
>
> but that gets me "Undefined index:  Clients "
>
> applications have a tax_affiliates_id and belong like this
>
> var $belongsTo = array(
>                 'TaxAffiliate' => array(
>                         'className' => 'TaxAffiliate',
>                         'foreignKey' => 'tax_affiliates_id',
>                         'conditions' => '',
>                         'fields' => '',
>                         'order' => ''
>                 )
>         );
>
> taxAffiliates belong to clients like this:
>
> var $belongsTo = array(
>                 'Clients' => array(
>                         'className' => 'Clients',
>                         'foreignKey' => 'clients_id',
>                         'conditions' => '',
>                         'fields' => '',
>                         'order' => ''
>                 )
>         );
>
> in my applications controler i have this
>
> $this->Application->contain(array('TaxAffiliates'=>array('Client')));
>
> and in the app_model i have set var $actsAs = array('Containable');
>
> I have a feeling it's not even looking in the TaxAffiliate model, as
> when i delete it i get the same result.
>
> appreciate any guidence towards being able to get at information
> deeper than the first level of association.
>
> Thanks
>
> Will.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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