This commit is contained in:
2022-09-29 22:58:43 +08:00
parent 62f3747701
commit 76154631e5
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ class HasCount extends HasBase
*/
public function get(): array|ModelInterface|null
{
$key = $this->model::className() . '_' . $this->primaryId . '_' . $this->value;
$key = $this->model . '_' . $this->primaryId . '_' . $this->value;
return $this->_relation->count($key);
}
+1 -1
View File
@@ -27,7 +27,7 @@ class HasMany extends HasBase
*/
public function get(): array|Collection|null
{
$key = $this->model::className() . '_' . $this->primaryId . '_' . $this->value;
$key = $this->model . '_' . $this->primaryId . '_' . $this->value;
return $this->_relation->get(md5($key));
}
}
+1 -1
View File
@@ -26,7 +26,7 @@ class HasOne extends HasBase
*/
public function get(): array|ModelInterface|null
{
$key = $this->model::className() . '_' . $this->primaryId . '_' . $this->value;
$key = $this->model . '_' . $this->primaryId . '_' . $this->value;
return $this->_relation->first(md5($key));
}
}