Skip to content

Commit 287ef9a

Browse files
committed
Update Transaction.php
1 parent 597b747 commit 287ef9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Transaction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)