Yii的交易不會保存在DB下面的示例代碼和記錄回滾:Yii的交易doen't回滾
$transaction = Yii::app()->db->beginTransaction();
$mode_1 = new Orders;
$mode_1->id_order = 3333;
$mode_1->AWB = 3333;
$mode_2 = new Orders;
$mode_2->id_order = 4444;
$mode_2->AWB = 4444;
$mode_2->save();
$mode_1->save();
$transaction->rollback();
什麼想法? ..謝謝
的可能重複[交易並不Yii中工作(http://stackoverflow.com/questions/13789965/transaction-doesnt-work-in-yii) – trejder