1
0
mirror of synced 2025-03-23 16:33:54 +03:00

[2.0] DOCS - Example on using multiple entities in FROM clause, added test for this sql generation also, since it seems this was untested before.

This commit is contained in:
beberlei 2010-02-14 10:08:58 +00:00
parent 077d9fb0e6
commit 6356886cec

View File

@ -180,6 +180,14 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase
);
}
public function testSupportsMultipleEntitesInFromClause()
{
$this->assertSqlGeneration(
'SELECT u, a FROM Doctrine\Tests\Models\CMS\CmsUser u, Doctrine\Tests\Models\CMS\CmsArticle a WHERE u.id = a.user.id',
'SELECT c0_.id AS id0, c0_.status AS status1, c0_.username AS username2, c0_.name AS name3, c1_.id AS id4, c1_.topic AS topic5, c1_.text AS text6 FROM cms_users c0_ INNER JOIN cms_users c2_ ON c1_.user_id = c2_.id WHERE c0_.id = c2_.id'
);
}
public function testSupportsPlainJoinWithoutClause()
{
$this->assertSqlGeneration(