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 Jan 20, 2024
1 parent 9fd7876 commit 4602c38
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 @@ -657,11 +657,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 4602c38

Please sign in to comment.