Active Record And Auto Commit

Just wrote a Yii app and on the mysql server the autocommit was set to true. Now when the app went into production I just realized that the mysql server autocommit is set to false. The app is using active record to save (which auto commits). Is there a variable that I can set in the config db file instead of having to add a beginTransaction and commit in each write to the db?

Solution:


'db'=>array(

    ...

    'initSQLs'=>array('SET AUTOCOMMIT=1',),

    ...

);