FIX Consistently quote orderby in DataQuery->ensureSelectContainsOrderbyColumns()

Otherwise aggregate queries through DataQuery->column() fail unless the
passed in field is specifically quoted already. This fixes ManyManyListTest->testRemoveAll()
This commit is contained in:
Ingo Schommer 2013-04-02 13:31:06 +02:00
parent fb5ef0293e
commit 5a8a067ae8

View File

@ -279,17 +279,15 @@ class DataQuery {
if(isset($databaseFields[$parts[0]])) {
$qualCol = "\"$baseClass\".\"{$parts[0]}\"";
// remove original sort
unset($orderby[$k]);
// add new columns sort
$orderby[$qualCol] = $dir;
} else {
$qualCol = "\"$parts[0]\"";
}
// remove original sort
unset($orderby[$k]);
// add new columns sort
$orderby[$qualCol] = $dir;
// To-do: Remove this if block once SQLQuery::$select has been refactored to store getSelect()
// format internally; then this check can be part of selectField()
$selects = $query->getSelect();