cakePHP, saveAll() and Transactions MySQL transactions and cakePHP, the two play nicely together. Its very easy to wrap your inserts and updates in transactions with cake: Model->begin(); try { if (!Model->save()) throw new Exception(’Model did not save’); if (!Model->subModel->save()) throw new Exception(’Sub Model did not save’); Model->commit(); } catch (Exception $e) { Model->rollback(); }
for tips on PHP and web development