I'm kind of new to cakePHP and get to the moment where i have to do pagination.
The comments table has a parent_id and the threaded query is working correctly so now, I want to paginate the results.
My problem is the limited sql query affects all the retrieved comments and I only want to limit the parent ones because the other way, it leaves replies out of the query.
Hope I'd be clear and you can help me.
Thanks.
Use:
and then in the find:
You have to customize the code for your purpose, but the keypoint is the relations and that the find condition has parent_id = null. This way the limit only affects the parents