CakePHP - problem with HABTM paginate query
问题 Tables restaurants cuisines cuisines_restaurants Both restaurant and cuisine model are set up to HABTM each other. I'm trying to get a paginated list of restaurants where Cuisine.name = 'italian' (example), but keep getting this error: 1054: Unknown column 'Cuisine.name' in 'where clause' Actual query it's building: SELECT `Restaurant`.`id`, `Restaurant`.`type` ..... `Restaurant`.`modified`, `Restaurant`.`user_id`, `User`.`display_name`, `User`.`username`, `User`.`id`, `City`.`id`,`City`.`lat