Created
May 6, 2014 22:19
-
-
Save mariuskubilius/2153921c7a91a74c8a24 to your computer and use it in GitHub Desktop.
Revisions
-
mariuskubilius created this gist
May 6, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ /** *Since Lithium uses PDO, you can just get the PDO object and call the beginTransaction() method. */ $foo = app\models\Foo::create(); $pdo = Connections::get('default')->connection; $pdo->beginTransaction(); $foo->bar = 'Hello'; $foo->save(); $pdo->commit(); /* * https://github.com/UnionOfRAD/lithium/issues/1004#issuecomment-23690165 * http://www.php.net/manual/en/pdo.begintransaction.php */