Added test complex inner join with indexBy
This commit is contained in:
parent
33888f1b08
commit
3997d0df87
@ -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()
|
public function testLeftJoin()
|
||||||
{
|
{
|
||||||
$qb = $this->_em->createQueryBuilder()
|
$qb = $this->_em->createQueryBuilder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user