Skip to content

Commit 47804c4

Browse files
Ibazheliu21st
authored andcommitted
修复where闭包查询中的回调对象$query丢失alias属性的bug
1 parent 6e0ea67 commit 47804c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/db/BaseQuery.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ public function newQuery(): BaseQuery
177177
$query->lazyFields($this->options['lazy_fields']);
178178
}
179179

180+
if (isset($this->options['alias'])) {
181+
$query->alias($this->options['alias']);
182+
}
183+
180184
return $query;
181185
}
182186

0 commit comments

Comments
 (0)