改名
This commit is contained in:
@@ -267,7 +267,7 @@ class SqlBuilder extends Component
|
|||||||
if ($this->query->from instanceof \Closure) {
|
if ($this->query->from instanceof \Closure) {
|
||||||
$activeQuery = new ActiveQuery($this->query->modelClass);
|
$activeQuery = new ActiveQuery($this->query->modelClass);
|
||||||
call_user_func($this->query->from, $activeQuery);
|
call_user_func($this->query->from, $activeQuery);
|
||||||
$this->query->from = $activeQuery->toSql();
|
$this->query->from = '(' . $activeQuery->toSql() . ')';
|
||||||
}
|
}
|
||||||
if ($this->query->from instanceof ActiveQuery) {
|
if ($this->query->from instanceof ActiveQuery) {
|
||||||
$this->query->from = '(' . SqlBuilder::builder($this->query->from)->get($this->query->from) . ')';
|
$this->query->from = '(' . SqlBuilder::builder($this->query->from)->get($this->query->from) . ')';
|
||||||
|
|||||||
Reference in New Issue
Block a user