【发布时间】:2013-12-18 22:02:56
【问题描述】:
在CakePHP 中,在查找查询的contain 中设置条件是好是坏,例如:
$data = $this->SomeModel->find('all', array(
'contain' => array(
'AnotherModel' => array(
'conditions' => array(
// some conditions
)
)
)
));
在哪些情况下将条件放入 contains 是有用的,什么时候应该使用它。抱歉,这仍然让我感到困惑。
谢谢
【问题讨论】:
标签: php cakephp cakephp-1.3 php-5.3