1
0
mirror of synced 2024-12-13 14:56:01 +03:00

Added test complex inner join with indexBy

This commit is contained in:
Vladislav Vlastovskiy 2013-05-09 03:32:28 +04:00
parent 33888f1b08
commit 3997d0df87

View File

@ -141,6 +141,19 @@ class QueryBuilderTest extends \Doctrine\Tests\OrmTestCase
'SELECT u, a FROM Doctrine\Tests\Models\CMS\CmsUser u INNER JOIN u.articles a ON u.id = a.author_id'
);
}
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()
{