/*public function testExistsExpressionSupportedInWherePart()
{
{
$this->assertValidDql('SELECT u.* FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE EXISTS (SELECT p.user_id FROM Doctrine\Tests\Models\CMS\CmsPhonenumber p WHERE p.user_id = u.id)');
$this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE EXISTS (SELECT p.user_id FROM Doctrine\Tests\Models\CMS\CmsPhonenumber p WHERE p.user_id = u.id)');
}
}
public function testNotExistsExpressionSupportedInWherePart()
public function testNotExistsExpressionSupportedInWherePart()
...
@@ -261,7 +252,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
...
@@ -261,7 +252,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
public function testOrderByWithFunctionExpression()
public function testOrderByWithFunctionExpression()
{
{
$this->assertValidDql('SELECT u.name FROM Doctrine\Tests\Models\CMS\CmsUser u ORDER BY COALESCE(u.id, u.name) DESC');
$this->assertValidDql('SELECT u.name FROM Doctrine\Tests\Models\CMS\CmsUser u ORDER BY COALESCE(u.id, u.name) DESC');
}
}*/
/*
/*
public function testSubselectInInExpression()
public function testSubselectInInExpression()
{
{
...
@@ -273,7 +264,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
...
@@ -273,7 +264,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
// Semantical error: Unknown query component u (probably in subselect)
// Semantical error: Unknown query component u (probably in subselect)
$this->assertValidDql("SELECT u.name, (SELECT COUNT(p.phonenumber) FROM CmsPhonenumber p WHERE p.user_id = u.id) pcount FROM CmsUser u WHERE u.name = 'zYne' LIMIT 1");
$this->assertValidDql("SELECT u.name, (SELECT COUNT(p.phonenumber) FROM CmsPhonenumber p WHERE p.user_id = u.id) pcount FROM CmsUser u WHERE u.name = 'zYne' LIMIT 1");
}
}
*/
*//*
public function testPositionalInputParameter()
public function testPositionalInputParameter()
{
{
$this->assertValidDql('SELECT * FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?');
$this->assertValidDql('SELECT * FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?');
...
@@ -282,7 +273,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
...
@@ -282,7 +273,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
public function testNamedInputParameter()
public function testNamedInputParameter()
{
{
$this->assertValidDql('SELECT * FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :id');
$this->assertValidDql('SELECT * FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = :id');
}
}*/
/*
/*
public function testCustomJoinsAndWithKeywordSupported()
public function testCustomJoinsAndWithKeywordSupported()
{
{
...
@@ -290,7 +281,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
...
@@ -290,7 +281,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
$this->assertValidDql('SELECT c.*, c2.*, d.* FROM Record_Country c INNER JOIN c.City c2 WITH c2.id = 2 WHERE c.id = 1');
$this->assertValidDql('SELECT c.*, c2.*, d.* FROM Record_Country c INNER JOIN c.City c2 WITH c2.id = 2 WHERE c.id = 1');
}
}
*/
*/
/*
public function testJoinConditionsSupported()
public function testJoinConditionsSupported()
{
{
$this->assertValidDql("SELECT u.name, p.* FROM Doctrine\Tests\Models\CMS\CmsUser u LEFT JOIN u.phonenumbers p ON p.phonenumber = '123 123'");
$this->assertValidDql("SELECT u.name, p.* FROM Doctrine\Tests\Models\CMS\CmsUser u LEFT JOIN u.phonenumbers p ON p.phonenumber = '123 123'");
...
@@ -320,7 +311,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
...
@@ -320,7 +311,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
{
{
$this->assertValidDql("SELECT * FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name NOT BETWEEN 'jepso' AND 'zYne'");
$this->assertValidDql("SELECT * FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name NOT BETWEEN 'jepso' AND 'zYne'");
}
}
*/
/* public function testAllExpressionWithCorrelatedSubquery()
/* public function testAllExpressionWithCorrelatedSubquery()
{
{
// We need existant classes here, otherwise semantical will always fail
// We need existant classes here, otherwise semantical will always fail
...
@@ -338,7 +329,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
...
@@ -338,7 +329,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
// We need existant classes here, otherwise semantical will always fail
// We need existant classes here, otherwise semantical will always fail
$this->assertValidDql('SELECT * FROM Employee e WHERE e.salary > SOME (SELECT m.salary FROM Manager m WHERE m.department = e.department)');
$this->assertValidDql('SELECT * FROM Employee e WHERE e.salary > SOME (SELECT m.salary FROM Manager m WHERE m.department = e.department)');
}
}
*/
*//*
public function testLikeExpression()
public function testLikeExpression()
{
{
$this->assertValidDql("SELECT u.id FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name LIKE 'z%'");
$this->assertValidDql("SELECT u.id FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name LIKE 'z%'");
...
@@ -353,7 +344,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
...
@@ -353,7 +344,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
{
{
$this->assertValidDql("SELECT u.id FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name LIKE 'z|%' ESCAPE '|'");
$this->assertValidDql("SELECT u.id FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.name LIKE 'z|%' ESCAPE '|'");
}
}
*/
/**
/**
* TODO: Hydration can't deal with this currently but it should be allowed.
* TODO: Hydration can't deal with this currently but it should be allowed.
* Also, generated SQL looks like: "... FROM cms_user, cms_article ..." which
* Also, generated SQL looks like: "... FROM cms_user, cms_article ..." which
...
@@ -362,7 +353,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
...
@@ -362,7 +353,7 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
* The main use case for this generalized style of join is when a join condition
* The main use case for this generalized style of join is when a join condition
* does not involve a foreign key relationship that is mapped to an entity relationship.
* does not involve a foreign key relationship that is mapped to an entity relationship.