【发布时间】:2016-09-05 14:22:31
【问题描述】:
我想在 cakephp 中为我的 2 级关联添加 where 子句。据我了解,这应该可行,但它给了我一个错误
错误:[PDOException] SQLSTATE[42S22]:未找到列:1054 'where 子句'中的未知列'User.email_address'。
$options = array(
'contain' => array(
'People',
'People' => array('User')
),
'conditions'=> array(
'User.email_address' => 'sample@mail.com'
),
'recursive' =>1,
);
$query = $this->Organization->find('all', $options);
【问题讨论】:
标签: cakephp model-associations cakephp-2.5