0
我有問題要得到CakePHP的相關模型信息
殼,這是我的shell:CakePHP的1.3外殼沒有得到相關的模型
class ContactShell extends Shell{
public $uses = array('Contact');
public function main(){
$contacts = $this->Contact->find('all', array(
'conditions' => array(
'Contact.is_sent' => false,
'Contact.is_bounce' => false),
'contain' => array('City' => array(
'fields' => array('City.name')))));
debug($contacts);
}
}
當我運行這個shell我得到錯誤
警告:模型「聯繫」是不是在C與模型「城市」有關:\ WAMP \ WWW \多哥 設計\蛋糕\庫\型號\行爲\ containable.php上線363
而結果只包含聯繫人模型數組。
控制器中的相同的腳本顯示我的城市陣列
如何獲得協會CakePHP的殼工作任何建議???
我也使用
$this->Contact->recursive = 1;