This commit is contained in:
2023-04-01 18:50:44 +08:00
parent cd94d2dc57
commit 1dfe32bf3c
4 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -28,6 +28,6 @@ class HasOne extends HasBase
public function get(): array|ModelInterface|null
{
$relation = Kiri::getDi()->get(Relation::class);
return $relation->first($this->name);
return $relation->getQuery($this->name)->first();
}
}