I was unfamiliar with the "Containable" behavior which is documented
here:

http://book.cakephp.org/view/474/Containable

The primary intended use of this behavior seems to be to restrict the
associations that are pulled in, but it can also be used to pull in
additional data.

I set up the Containable behavior for all my models by creating an app/
app_model.php with this line of code:

var $actsAs = array('Containable');

Since my view was paginated, I had to use this code in my controller
to get things working:

$this->paginate['Request'] = array(
  'contain' => array('Foo', 'Bar', 'Item' => array('Master')),
);

Thanks!

  -- Mike

On May 13, 1:46 pm, Miles J <[email protected]> wrote:
> You would have to set the belongsTo to the item, and then the item
> belongsTo the master. And just use containable.
>
> $results = $this->Request->find('all', array('contain' => array('Item'
> => array('Master'))));

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