Skip to content

Commit

Permalink
修复样式
Browse files Browse the repository at this point in the history
  • Loading branch information
idcpj committed Jun 7, 2024
1 parent 756a032 commit cb000aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/model/relation/OneToOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cb000aa

Please sign in to comment.