I know that when we adopt Active Record updates during a transaction, we should use
$trans = $model->dbConnection->beginTransaction();
And when we adopt DAO updates during a transaction, we should use
$trans = Yii::app()->db->beginTransaction();
But how to begin a transaction when we do update via ActiveRecord and DAO within a transaction?
So far, I have been using
$trans = Yii::app()->db->beginTransaction();
for the mixed up case.
Can anyone guide me here?