File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class Transaction extends \yii\base\BaseObject
4040 * can [[commit()]] or [[rollBack()]].
4141 */
4242 public function getIsActive (){
43- return $ this ->clientSession ->db ->getIsActive () && $ this ->clientSession ->mongoSession ->isInTransaction ();
43+ return $ this ->clientSession ->db ->getIsActive () && $ this ->clientSession ->mongoSession ->HasTransaction ();
4444 }
4545
4646 /**
@@ -54,7 +54,7 @@ public function getIsActive(){
5454 public function start ($ transactionOptions = []){
5555 Command::prepareCPOptions ($ transactionOptions );
5656 Yii::debug ('Starting mongodb transaction ... ' , __METHOD__ );
57- if ($ this ->clientSession ->isInTransaction ())
57+ if ($ this ->clientSession ->HasTransaction ())
5858 throw new Exception ('Nested transaction not supported ' );
5959 $ this ->clientSession ->db ->trigger (Connection::EVENT_START_TRANSACTION );
6060 if ($ this ->clientSession ->db ->enableLogging )
You can’t perform that action at this time.
0 commit comments