From b4bb099fe472b18b309aedb36a26f6b95f39cf77 Mon Sep 17 00:00:00 2001 From: Sasule Date: Thu, 29 May 2014 14:24:26 +0200 Subject: [PATCH] Fix makeWhere --- Grido/DataSources/Doctrine.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } } +