I’ve just encountered the problem that Yii ignores my limit in my SQL statement. The forum search showed me that I have to disable pagination. But I use CDbCriteria object, so it may indeed not related to it, right? Here is my code up to now. If I display the SQL statement, I can not see any limit.
I see your point. The problem is that I can not write one single sql-statement which should get all folders and posts with a limit. So you say that the problem is that I am using eager loading instead of lazy loading, right?
How can I use lazy loading than? I can not simply remove the "posts" from "folders", because there is another code in there that I need.