Skip to content

Commit

Permalink
This causes the column to be added twice, if the user defines a custo…
Browse files Browse the repository at this point in the history
…m alias in the select statement.
  • Loading branch information
thirsch committed Apr 6, 2019
1 parent c0e17ef commit 502b8cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Doctrine/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -662,11 +662,13 @@ public function parseSelect($dql)

$this->_neededTables[] = $tableAlias;

// This causes the column to be added twice, if the user defines a custom alias
// in the select statement.
// Fix for http://www.doctrine-project.org/jira/browse/DC-585
// Add selected columns to pending fields
if (preg_match('/^([^\(]+)\.(\'?)(.*?)(\'?)$/', $expression, $field)) {
/*if (preg_match('/^([^\(]+)\.(\'?)(.*?)(\'?)$/', $expression, $field)) {
$this->_pendingFields[$componentAlias][$alias] = $field[3];
}
}*/

} else {
$e = explode('.', $terms[0]);
Expand Down

0 comments on commit 502b8cc

Please sign in to comment.