Commit 6356886c authored by beberlei's avatar beberlei

[2.0] DOCS - Example on using multiple entities in FROM clause, added test for...

[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.
parent 077d9fb0
...@@ -180,6 +180,14 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase ...@@ -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() public function testSupportsPlainJoinWithoutClause()
{ {
$this->assertSqlGeneration( $this->assertSqlGeneration(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment