在cake 3.2.7安装上,saveMany()出现问题。它给出了错误Unknown method "saveMany"
。
$cartArrSave = Array
(
[0] => Array
(
[deal_id] => 4
[store_id] => 126
[user_id] => 124
[quantity] => 1
)
[1] => Array
(
[deal_id] => 9
[store_id] => 127
[user_id] => 124
[quantity] => 1
)
)
$this->Deals = TableRegistry::get('Deals');
if(!empty($cartArrSave)){
$this->Deals->newEntities($cartArrSave);
$this->Deals->saveMany($cartArrSave);
}
我已经检查了cakephp 2
是否支持saveMany 也受其支持那为什么会给出这样的错误?
请提出cakephp 2.7.8中的saveMany函数的替代方法吗?