Tuesday, June 1, 2010

Containable() not working for $this->Model1->Model2->find('', array('contain') => 'Model3');

I'm trying to avoid putting $uses at the top of my controller and
aiming to make do with model associations, but alas containable()
doesn't work when trying:

$this->Model1->Model2->find('threaded', array('contain') => 'Model3');

But:

$this->Model1->find('threaded', array('contain') => 'Model2.Model3');

Provides me a threaded result, containable works, but the find results
not in the array structure I want (using parent_id to make threaded
comments)...

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: