Repository: Properly handle non-aliased columns

This commit is contained in:
Johannes Meyer 2016-04-21 10:09:04 +02:00
parent 6faed28e1b
commit 28c024c037
1 changed files with 3 additions and 2 deletions

View File

@ -903,8 +903,9 @@ abstract class Repository implements Selectable
$blacklist = $this->getBlacklistedQueryColumns(); $blacklist = $this->getBlacklistedQueryColumns();
$columns = array(); $columns = array();
foreach ($queryColumns[$table] as $alias => $column) { foreach ($queryColumns[$table] as $alias => $column) {
if (! in_array(is_string($alias) ? $alias : $column, $blacklist)) { $name = is_string($alias) ? $alias : $column;
$columns[$alias] = $this->resolveQueryColumnAlias($table, $alias); if (! in_array($name, $blacklist)) {
$columns[$alias] = $this->resolveQueryColumnAlias($table, $name);
} }
} }