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

2010-06-03 Thread Shaz
Thanks! On 2 June, 14:21, John Andersen j.andersen...@gmail.com wrote: Ok, so what you want is: 1) The article; 2) The related comments; 3) The related comment ranks for each comment. [code] $this-Article-Comment-find(    'threaded',    array(       'contain' = array('Article',

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

2010-06-02 Thread Shaz
$this-Article-Comment-find( 'threaded', array( 'contain' = array('CommentRank'), 'conditions' = array('Article.id' = $id) ) ); ^^ Sorry it was a typo in the post; the code above is from my application. It does return an Array but doesn't use the containable behavior;

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

2010-06-02 Thread John Andersen
Ok, so what you want is: 1) The article; 2) The related comments; 3) The related comment ranks for each comment. [code] $this-Article-Comment-find( 'threaded', array( 'contain' = array('Article', 'CommentRank'), 'conditions' = array('Comment.article_id' = $id) ) ); [/code]

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

2010-06-01 Thread Shaz
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') =

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

2010-06-01 Thread John Andersen
I do hope it is only a typo in the post and not in your code! [code] $this-Model1-Model2-find( 'threaded', array('contain' = 'Model3') ); [/code] Is the above what is not working? Have you checked that an association/relationship is defined between Model2 and Model3? Enjoy, John On Jun