This commit is contained in:
2021-08-16 18:31:41 +08:00
parent 51b0212527
commit cb9e7e8775
+5 -1
View File
@@ -32,7 +32,11 @@ class Connection extends Component
public function inTransaction($cds): bool
{
$name = $this->name('Mysql:' . $cds, true);
return Context::getContext('begin_' . $name) == 0;
$connection = Context::getContext($name);
if ($connection instanceof PDO) {
$connection->inTransaction();
}
return false;
}
/**