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