From f8f22c39c40e0541f68cb358b02b5e81d4f8ec59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 10 Apr 2023 17:35:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Model.php b/Model.php index e82a84f..66b7484 100644 --- a/Model.php +++ b/Model.php @@ -11,6 +11,7 @@ namespace Database; use Database\Base\Getter; +use Database\Traits\HasBase; use Exception; use Kiri; use Kiri\Exception\NotFindClassException; @@ -264,6 +265,9 @@ class Model extends Base\Model $with = $this->getWith(); foreach ($with as $value) { $join = $this->{'get' . ucfirst($value)}(); + if ($join instanceof HasBase) { + $join = $join->get(); + } if ($join instanceof Kiri\ToArray) { $join = $join->toArray(); }