Having problems with saveMany() on a cake 3.2.7 install. It give an error 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);
}
I have checked that saveMany is supported in even cakephp 2
And also its supported in cakephp 3.x
Then why its giving such error?
Please suggest any alternative to saveMany function in cakephp 2.7.8?