phiras
(Phiras)
1
hi,
The following :
$account = Account::model()->with(array('profile.comments'=> array('order' => 'coments.created', 'limit' => 5)))->find('`t`.name=:name', array(':name'=>$name));
should bring only five records from comments table, but it is fetching them all. any clue ?
zminic
(Mrjack01)
2
I’m having exactly the same problem… I have reported an issue here
mikl
(Mike)
3
That’s not possible, as a LIMIT is not available for JOIN conditions in SQL. You can only use LIMIT on the complete result set.
Edit: Oh, Qiang already commented the same on your issue 