diff --git a/lib/Doctrine/ORM/Query/Expr/Join.php b/lib/Doctrine/ORM/Query/Expr/Join.php index c7ca935eb..7a59e247a 100644 --- a/lib/Doctrine/ORM/Query/Expr/Join.php +++ b/lib/Doctrine/ORM/Query/Expr/Join.php @@ -139,7 +139,7 @@ class Join { return strtoupper($this->joinType) . ' JOIN ' . $this->join . ($this->alias ? ' ' . $this->alias : '') - . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : '') - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : ''); + . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') + . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); } }