error in joining table in cakephp
问题 Controller public function index(){ $this->Store->unbindModel( array('belongsTo' => array('Employee')), true ); $options=array( 'joins' => array( array( 'table' => 'Employee', 'alias' => 'Employee', 'foreignKey' => true, 'conditions'=> array('Employee.employee_store = Store.store_name') ) )); $coupons = $this->Store->find('all', $options); } Model class Store extends AppModel { var $useTable = 'store'; } Sql : SELECT `Store`.`id`, `Store`.`store_name`, `Store`.`store_address`, `Store`.`store