Merge branch 'DDC-2437'
This commit is contained in:
commit
86277def7e
@ -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 : '');
|
||||
}
|
||||
}
|
||||
|
@ -142,6 +142,19 @@ class QueryBuilderTest extends \Doctrine\Tests\OrmTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testComplexInnerJoinWithIndexBy()
|
||||
{
|
||||
$qb = $this->_em->createQueryBuilder()
|
||||
->select('u', 'a')
|
||||
->from('Doctrine\Tests\Models\CMS\CmsUser', 'u')
|
||||
->innerJoin('u.articles', 'a', 'ON', 'u.id = a.author_id', 'a.name');
|
||||
|
||||
$this->assertValidQueryBuilder(
|
||||
$qb,
|
||||
'SELECT u, a FROM Doctrine\Tests\Models\CMS\CmsUser u INNER JOIN u.articles a INDEX BY a.name ON u.id = a.author_id'
|
||||
);
|
||||
}
|
||||
|
||||
public function testLeftJoin()
|
||||
{
|
||||
$qb = $this->_em->createQueryBuilder()
|
||||
|
Loading…
Reference in New Issue
Block a user