@@ -54,10 +54,10 @@ public function getIsActive(){
5454 public function start ($ transactionOptions = []){
5555 Command::prepareCPOptions ($ transactionOptions );
5656 Yii::debug ('Starting mongodb transaction ... ' , __METHOD__ );
57- if ($ this ->clientSession ->mongoSession -> isInTransaction ())
57+ if ($ this ->clientSession ->isInTransaction ())
5858 throw new Exception ('Nested transaction not supported ' );
5959 $ this ->clientSession ->db ->trigger (Connection::EVENT_START_TRANSACTION );
60- if ($ this ->clientSession ->mongoSession -> db ->enableLogging )
60+ if ($ this ->clientSession ->db ->enableLogging )
6161 Yii::beginProfile ('mongodb > start transaction(session id => ' .$ this ->clientSession ->getId ().') ' );
6262 $ this ->clientSession ->mongoSession ->startTransaction ($ transactionOptions );
6363 Yii::debug ('MongoDB transaction started. ' , __METHOD__ );
@@ -70,7 +70,7 @@ public function start($transactionOptions = []){
7070 public function commit (){
7171 Yii::debug ('Committing mongodb transaction ... ' , __METHOD__ );
7272 $ this ->clientSession ->mongoSession ->commitTransaction ();
73- if ($ this ->clientSession ->mongoSession -> db ->enableLogging )
73+ if ($ this ->clientSession ->db ->enableLogging )
7474 Yii::endProfile ('mongodb > start transaction(session id => ' .$ this ->clientSession ->getId ().') ' );
7575 Yii::debug ('Commit mongodb transaction. ' , __METHOD__ );
7676 $ this ->clientSession ->db ->trigger (Connection::EVENT_COMMIT_TRANSACTION );
@@ -83,7 +83,7 @@ public function commit(){
8383 public function rollBack (){
8484 Yii::debug ('Rolling back mongodb transaction ... ' , __METHOD__ );
8585 $ this ->clientSession ->mongoSession ->abortTransaction ();
86- if ($ this ->clientSession ->mongoSession -> db ->enableLogging )
86+ if ($ this ->clientSession ->db ->enableLogging )
8787 Yii::endProfile ('mongodb > start transaction(session id => ' .$ this ->clientSession ->getId ().') ' );
8888 Yii::debug ('Roll back mongodb transaction. ' , __METHOD__ );
8989 $ this ->clientSession ->db ->trigger (Connection::EVENT_ROLLBACK_TRANSACTION );
0 commit comments