I have a News model that has many Comments. What I need is to find ten News that has new Comments.
At first this task is seems to be eazy, I just need to find last ten Comments ($this->Comment->find('all');) and just display related News, but in case I have 2 comments for the same news I will recieve a duplicated news entry.
So, can I order News by Comments date or something?
*And here is solution. Thanks Dave
$this->Comment->find('all', array(
'order' => array(
'Comment.created' => 'DESC'
),
'group' => 'News.id',
));