I do something similar except I put of that "contain" monster array in the
model since I just find it cluttering to see that in the controller.

Another little trick I find depending on the number of fields in PlanDetail
you can simply enter the ones you do not want with 

'fields' => array_diff(array_keys($this->Schema()), array( 'not_this_field'
'not_that_field' )), 

Controller:

$this->paginate['Plan'] = $this->Plan->__pagingPlans();
$this->set('plans', $this->paginate('Plan'));

Model:

function __pagingPlans() {

        return array('contain' => array('PlanDetail' => array('fields'   =>
array('id',
        'effective_date',
        'expiration_date',
        'active',
        'name',
        'plan_type_id',
        'max_benefit',
        'deductible',
        'preventive',
        'basic',
        'major',
        'ortho',
        'application_url',
        '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