Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Magento: Save multiple models in one transaction
// $foo = Mage::getModel('.....
// $bar = Mage::getModel('.....
$transaction = Mage::getModel('core/resource_transaction');
$transaction->save(); // runs save on all objects. On error -> rollback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment