Use Grammar from Query in Widget List

When using models with a different database software than the default, the old code produced a syntax error. 
Using the Grammar from the query ensures that the alias is always wrapped correctly. 

Suggestion: The code should be scanned for similar errors, produced by using DB Facade.
This commit is contained in:
CSNWEB 2016-01-10 14:10:49 +01:00
parent 5a70cec7a2
commit aa5f37aae6
1 changed files with 1 additions and 1 deletions

View File

@ -410,7 +410,7 @@ class Lists extends WidgetBase
continue;
}
$alias = Db::getQueryGrammar()->wrap($column->columnName);
$alias = $query->getQuery()->getGrammar()->wrap($column->columnName);
/*
* Relation column