From 528f43c7acc2704bcf9329f93516b2c0a39362e9 Mon Sep 17 00:00:00 2001 From: xl Date: Wed, 6 Nov 2024 21:33:36 +0800 Subject: [PATCH] eee --- Relation.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Relation.php b/Relation.php index f8b9332..86f4c31 100644 --- a/Relation.php +++ b/Relation.php @@ -7,6 +7,7 @@ namespace Database; use Database\Base\ActiveQueryInterface; use Kiri\Abstracts\Component; use Kiri\Di\Context; +use Swoole\Coroutine; /** * Class Relation @@ -56,7 +57,7 @@ class Relation extends Component public function first(string $_identification): mixed { if (!Context::exists($_identification)) { - Context::set($_identification, $this->_query[$_identification]->first()); + Context::set($_identification, $this->_query[$_identification]->first(), Coroutine::getuid()); } return Context::get($_identification); } @@ -69,7 +70,7 @@ class Relation extends Component public function count(string $_identification): mixed { if (!Context::exists($_identification)) { - Context::set($_identification, $this->_query[$_identification]->count()); + Context::set($_identification, $this->_query[$_identification]->count(), Coroutine::getuid()); } return Context::get($_identification); } @@ -83,7 +84,7 @@ class Relation extends Component public function get(string $_identification): mixed { if (Context::exists($_identification)) { - Context::set($_identification, $this->_query[$_identification]->get()); + Context::set($_identification, $this->_query[$_identification]->get(), Coroutine::getuid()); } return Context::get($_identification); }