diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index 9adcd1a08..c24fa40cc 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -291,8 +291,8 @@ class SqlWalker implements TreeWalker $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; if ( ! isset($this->tableAliasMap[$tableName])) { - $tablePrefixAlias = preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't'; - $this->tableAliasMap[$tableName] = $tablePrefixAlias . $this->tableAliasCounter++ . '_'; + $this->tableAliasMap[$tableName] = (preg_match('/[a-z]/i', $tableName[0]) ? strtolower($tableName[0]) : 't') + . $this->tableAliasCounter++ . '_'; } return $this->tableAliasMap[$tableName];