From cb000aa04dc4d185c95db3e7e96df90bcc637af3 Mon Sep 17 00:00:00 2001 From: idcpj Date: Fri, 7 Jun 2024 13:06:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/relation/OneToOne.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/model/relation/OneToOne.php b/src/model/relation/OneToOne.php index c45489ed..7e6d8e19 100644 --- a/src/model/relation/OneToOne.php +++ b/src/model/relation/OneToOne.php @@ -90,9 +90,9 @@ public function eagerly(Query $query, string $relation, $field = true, string $j } // 预载入封装 - $joinTable = $this->query->getTable(); - $joinAlias = $relation; - $joinType = $joinType ?: $this->joinType; + $joinTable = $this->query->getTable(); + $joinAlias = $relation; + $joinType = $joinType ?: $this->joinType; $query->via($joinAlias); @@ -315,8 +315,8 @@ protected function match(string $model, string $relation, Model $result): void protected function bindAttr(Model $result, Model $model = null): void { foreach ($this->bindAttr as $key => $attr) { - $key = is_numeric($key) ? $attr : $key; - $value = $result->getOrigin($key); + $key = is_numeric($key) ? $attr : $key; + $value = $result->getOrigin($key); if (!is_null($value)) { throw new Exception('bind attr has exists:' . $key);