Skip to content

Commit

Permalink
修复where闭包查询中的回调对象$query丢失alias属性的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibazhe authored and liu21st committed Dec 25, 2024
1 parent 6e0ea67 commit 47804c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/db/BaseQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ public function newQuery(): BaseQuery
$query->lazyFields($this->options['lazy_fields']);
}

if (isset($this->options['alias'])) {
$query->alias($this->options['alias']);
}

return $query;
}

Expand Down

0 comments on commit 47804c4

Please sign in to comment.