- Model:: saveAll(), .
If you cannot use saveAll (), you need to use something like Model :: query (), you can do:
$this->ModelX->begin();
$this->Model1->query();
$this->Model2->query();
$this->ModelX->commit();
As with Cake 1.3, it really doesn't matter which model you use when you start the begin / commit / rollback statements; all of them cause the execution of the same code and do not have any side effects specific to a particular model.
source
share