diff --git a/Grido/DataSources/Doctrine.php b/Grido/DataSources/Doctrine.php index 66028ac9..6f8f5c33 100644 --- a/Grido/DataSources/Doctrine.php +++ b/Grido/DataSources/Doctrine.php @@ -136,11 +136,11 @@ protected function makeWhere(Condition $condition, \Doctrine\ORM\QueryBuilder $q $columns = $condition->column; foreach ($columns as $key => $column) { if (!Condition::isOperator($column)) { - $columns[$key] = isset($this->filterMapping[$column]) + $columns[$key] = (isset($this->filterMapping[$column]) ? $this->filterMapping[$column] - : Strings::contains($column, ".") ? $column : $this->qb->getRootAlias() . '.' . $column; + : (Strings::contains($column, ".") ? $column : $this->qb->getRootAlias() . '.' . $column)); + } } - } $condition->setColumn($columns); list($where) = $condition->__toArray(NULL, NULL, FALSE); @@ -298,3 +298,4 @@ public function suggest($column, array $conditions, $limit) return array_values($items); } } +