变更
This commit is contained in:
+8
-1
@@ -186,7 +186,14 @@ class Connection extends Component
|
||||
*/
|
||||
public function getPdo(): PDO
|
||||
{
|
||||
return $this->getMasterClient();
|
||||
if (!Db::inTransactionsActive()) {
|
||||
return $this->getMasterClient();
|
||||
}
|
||||
if (!Context::hasContext($this->cds)) {
|
||||
return Context::setContext($this->cds, $this->getMasterClient());
|
||||
} else {
|
||||
return Context::getContext($this->cds);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user