From 6356886cec73762d8142b982e7ef0694131d2740 Mon Sep 17 00:00:00 2001 From: beberlei Date: Sun, 14 Feb 2010 10:08:58 +0000 Subject: [PATCH] [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. --- .../Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php index aceaa85cb..b6e27d216 100644 --- a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -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(