No go on these one.
I tried to switch it to :
$this->paginate = array(
'contain' => array('Chip'=>array('Measurement'))
also some other variations that seemed to might work like:
array('Chip'=>array('Result'))
array('Chip' => array('Result' => 'Measurement'))
array('Chip'=>array('Measurement','Result') )
any other ideas on how to tell "contain" the association?
Maybe it needs to be defined in the model ?
On Oct 20, 3:27 pm, "Mike Karthauser" <[email protected]> wrote:
> On Wed, October 20, 2010 2:10 pm, ravidp wrote:
> > add your code and it is indeed recognize the contain with other
> > simpler cases.
>
> > but, on my case, I get
> > " Model "Measurement" is not associated with model "Chip"
>
> > in "Measurement" i have in $belongsTo:
> > 'Result' => array(
> > 'className' => 'Result',
> > 'foreignKey' => 'result_id',
> > 'conditions' => '',
> > 'fields' => '',
> > 'order' => ''
> > ),
>
> > in "Result" i have in $belongsTo:
> > 'Chip' => array(
> > 'className' => 'Chip',
> > 'foreignKey' => 'chip_id',
> > 'conditions' => '',
> > 'fields' => '',
> > 'order' => ''
> > ),
>
> > So why its not associated ?
>
> you havent told contain about it.
>
> change
>
> $this->paginate = array(
> 'contain' => array('Chip')
> );
>
> to
>
> $this->paginate = array(
> 'contain' => array('Chip'=>array('Measurement'))
> );
>
>
>
>
>
> > On Oct 20, 3:00 pm, "Mike Karthauser" <[email protected]> wrote:
> >> On Wed, October 20, 2010 1:52 pm, ravidp wrote:
> >> > Problem wasn't solved ):
>
> >> > I have added:
> >> > $this->paginate = array(
> >> > 'recursive' => 2,
> >> > 'contain' => array('Chip')
> >> > );
>
> >> > and my page become a blank white(as it became before the contain)
> >> > Am i missing something?
>
> >> > BTW, even if I use recursive = 1 and contain from 1 level.
> >> > I still don't get the "containment" so I think i'm missing something
> >> > here.
>
> >> have you added contain into your $actsAs in the top of your model or
> >> app_model.php ?
>
> >> var $actsAs = array(
> >> 'Containable' => array('notices' =>
> >> true));
>
> >> you wont need to specify a recursive setting either if you are using
> >> containable.
>
> >> > On Oct 20, 2:29 pm, Tilen Majerle <[email protected]> wrote:
> >> >> no problem :D :D
> >> >> --
> >> >> Tilen Majerlehttp://majerle.eu
>
> >> >> 2010/10/20 ravidp <[email protected]>
>
> >> >> > EXACTLY what i needed.
>
> >> >> > Thanks you SO much.
>
> >> >> > On Oct 20, 2:20 pm, Tilen Majerle <[email protected]> wrote:
> >> >> > > use Containable behavior and there set options which you need it
>
> >> >> > >http://book.cakephp.org/view/1323/Containable
>
> >> >> > > --
> >> >> > > Tilen Majerlehttp://majerle.eu
>
> >> >> > > 2010/10/20 ravidp <[email protected]>
>
> >> >> > > > Hi,
>
> >> >> > > > I need to paginate data from table connected across 3 levels
> >> >> (a->b-
> >> >> > > > >c).
> >> >> > > > The thing is, recursive = 2 brings a-l-l the the connected
> >> tables,
> >> >> > > > which is way too much for my use and too heavy to retrieve.
>
> >> >> > > > Is there a way to specify the exact connection i want to
> >> retrieve
> >> >> > > > between the tables?
>
> >> >> > > > Thanks in advance
>
> >> >> > > > Check out the new CakePHP Questions
> >> sitehttp://cakeqs.organdhelp
> >> >> > others
> >> >> > > > with their CakePHP related questions.
>
> >> >> > > > 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]<cake-php%[email protected]>
> >> >> > <cake-php%[email protected]<cake-php%[email protected]>>For
> >> >> > more options, visit this group at
> >> >> > > >http://groups.google.com/group/cake-php?hl=en
>
> >> >> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> >> >> others
> >> >> > with their CakePHP related questions.
>
> >> >> > 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]<cake-php%[email protected]>For
> >> >> more options, visit this group at
> >> >> >http://groups.google.com/group/cake-php?hl=en
>
> >> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> >> others
> >> > with their CakePHP related questions.
>
> >> > 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
> >> > athttp://groups.google.com/group/cake-php?hl=en
>
> >> --
> >> Mike Karthauser
> >> Managing Director - Brightstorm Ltd
>
> >> Email: [email protected]
> >> Web:http://www.brightstorm.co.uk
> >> Tel: 07939 252144 (mobile)
> >> Fax: 0870 1320560
>
> >> Address: 1 Brewery Court, North Street, Bristol, BS3 1JS
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > 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
> > athttp://groups.google.com/group/cake-php?hl=en
>
> --
> Mike Karthauser
> Managing Director - Brightstorm Ltd
>
> Email: [email protected]
> Web:http://www.brightstorm.co.uk
> Tel: 07939 252144 (mobile)
> Fax: 0870 1320560
>
> Address: 1 Brewery Court, North Street, Bristol, BS3 1JS
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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