Cakephp retrieving HABTM which Conditions
问题 I'm using cakephp and would like to display all Submissions which are part of Category 'X' I have 4 tables with a HABTM relationship. Users -> (haveMany) -> Submissions <-> (hasAndBelongsToMany) <-> Categories but I would like to do so using the $this->paginate() and for each submission I would like to display the user who posted the submission. User Table Id | Name -----+------------------- 1 | User 1 2 | User 2 Submission Table Id | Name | User_id -----+-------------------+-------------- 1