You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$options['defaultTransactionOptions']['writeConcern'] = (new \ReflectionClass('\MongoDB\Driver\WriteConcern'))->newInstanceArgs($options['defaultTransactionOptions']['writeConcern']);
$options['defaultTransactionOptions']['readPreference'] = (new \ReflectionClass('\MongoDB\Driver\ReadPreference'))->newInstanceArgs($options['defaultTransactionOptions']['readPreference']);
91
+
}
92
+
}
93
+
}
94
+
42
95
/**
43
96
* Start a new session in a connection.
44
97
* @param Connection $db
@@ -47,7 +100,7 @@ class ClientSession extends \yii\base\BaseObject
47
100
* @return ClientSession return new session base on a session options for the given connection
$execOptions['defaultTransactionOptions']['writeConcern'] = (new \ReflectionClass('\MongoDB\Driver\WriteConcern'))->newInstanceArgs($execOptions['defaultTransactionOptions']['writeConcern']);
$execOptions['defaultTransactionOptions']['readPreference'] = (new \ReflectionClass('\MongoDB\Driver\ReadPreference'))->newInstanceArgs($execOptions['defaultTransactionOptions']['readPreference']);
530
-
}
531
-
}
532
-
533
473
/**
534
474
* start new session for current connection
535
475
* @param array $sessionOptions see doc of ClientSession::start()
@@ -559,7 +499,7 @@ public function getSession(){
559
499
* start transaction with three step :
560
500
* - start new session
561
501
* - start transaction of new session
562
-
* - set new session to current command
502
+
* - set new session to current connection
563
503
* @param array $transactionOptions see doc of Transaction::start()
564
504
* @param array $sessionOptions see doc of ClientSession::start()
565
505
* return ClientSession
@@ -583,7 +523,7 @@ public function commitTransaction(){
0 commit comments