Skip to content

Commit

Permalink
Merge pull request #139 from sasule/doctrine-fix
Browse files Browse the repository at this point in the history
Fix mapping Doctrine dataSource
  • Loading branch information
o5 committed May 29, 2014
2 parents ead9a40 + b4bb099 commit c521f2e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Grido/DataSources/Doctrine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -298,3 +298,4 @@ public function suggest($column, array $conditions, $limit)
return array_values($items);
}
}

0 comments on commit c521f2e

Please sign in to comment.