It looks like an improperly closed parenthesis to me. This is the
array for the PlanDetail contain that you supplied:

    'PlanDetail' =>
    array('fields' =>
    array('id',
          'effective_date',
          'expiration_date',
          'active',
          'name',
          'plan_type_id',
          'max_benefit',
          'deductible',
          'preventive',
          'basic',
          'major',
          'ortho',
          'company_id',
          'plan_type_id',
          'plan_detail_note_id'),

Notice how there's only one closing parenthesis at the end? You're
missing one. You need two: one to close the array of fields and one to
close the PlanType array. So, that's throwing off the rest oo -f your
array, and explains why you have an extra parenthesis at the very end
of your query statement.

- Jamie

On Feb 14, 2:15 pm, OldWest <[email protected]> wrote:
> $plan['PlanDetail']['Company']['company_logo_url']
>
> Nothing is populated. The company_logo_url is in the Company mode. And the
> Company model is associated to the PlanDetail company_id (as you can see
> below). In my debug(), ALL field data is showing,
>
> ...[Company] => Array
>                     (
>                         [id] => 20
>                         [company_logo_url] => madison_dental.gif
>                     )...
>
> but the value is not being populated (in my view). It all works perfectly
> fine if I just do a
>
> $this->Plan->find('all');
>
> Here is my containable query:
>
> $this->Plan->find('all',
>     array('contain' =>
>     array('PlanDetail' =>
>     array('fields' =>
>     array('id',
>           'effective_date',
>           'expiration_date',
>           'active',
>           'name',
>           'plan_type_id',
>           'max_benefit',
>           'deductible',
>           'preventive',
>           'basic',
>           'major',
>           'ortho',
>           'company_id',
>           'plan_type_id',
>           'plan_detail_note_id'),  
>
>          'Company' =>
>             array('fields'=>
>             array(
>             'id',
>             'company_logo_url'
>             )),
>
>         'PlanType' =>
>             array('fields'=>
>             array(
>             'id',
>             'name'
>             ))
>
>             ))));

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