This commit is contained in:
xl
2024-11-06 21:06:01 +08:00
parent 59c9a2e944
commit 4e59053d5c
7 changed files with 20 additions and 10 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ abstract class HasBase implements \Database\Traits\Relation
public function __call(string $name, array $arguments)
{
if ($name !== 'get') {
$query = Context::get(Relation::class)->getQuery($this->name);
$query = di(Relation::class)->getQuery($this->name);
if (is_null($query)) {
throw new \Exception('Unknown relation key: ' . $this->name);
}