$this->assertValidDql("SELECT u.name FROM User u LEFT JOIN u.Phonenumber p HAVING MAX(u.name) = 'zYne'");
}
publicfunctiontestLeftJoin()
{
$this->assertValidDql('FROM User u LEFT JOIN u.UserGroup');
}
publicfunctiontestJoin()
{
$this->assertValidDql('FROM User u JOIN u.UserGroup');
}
publicfunctiontestInnerJoin()
{
$this->assertValidDql('FROM User u INNER JOIN u.UserGroup');
}
publicfunctiontestMultipleLeftJoin()
{
$this->assertValidDql('FROM User u LEFT JOIN u.UserGroup LEFT JOIN u.Phonenumber');
}
publicfunctiontestMultipleInnerJoin()
{
$this->assertValidDql('SELECT u.name FROM User u INNER JOIN u.UserGroup INNER JOIN u.Phonenumber');
}
publicfunctiontestMultipleInnerJoin2()
{
$this->assertValidDql('SELECT u.name FROM User u INNER JOIN u.UserGroup, u.Phonenumber');
}
publicfunctiontestMixingOfJoins()
{
$this->assertValidDql('SELECT u.name, g.name, p.phonenumber FROM User u INNER JOIN u.UserGroup g LEFT JOIN u.Phonenumber p');
}
publicfunctiontestMixingOfJoins2()
{
$this->assertValidDql('SELECT u.name, g.name, p.phonenumber FROM User u INNER JOIN u.UserGroup.Phonenumber p');
}
publicfunctiontestOrderBySingleColumn()
{
$this->assertValidDql('SELECT u.name FROM User u ORDER BY u.name');
}
publicfunctiontestOrderBySingleColumnAscending()
{
$this->assertValidDql('SELECT u.name FROM User u ORDER BY u.name ASC');
}
publicfunctiontestOrderBySingleColumnDescending()
{
$this->assertValidDql('SELECT u.name FROM User u ORDER BY u.name DESC');
}
publicfunctiontestOrderByMultipleColumns()
{
$this->assertValidDql('SELECT u.firstname, u.lastname FROM User u ORDER BY u.lastname DESC, u.firstname DESC');
}
publicfunctiontestOrderByWithFunctionExpression()
{
$this->assertValidDql('SELECT u.name FROM User u ORDER BY COALESCE(u.id, u.name) DESC');
}
publicfunctiontestSubselectInInExpression()
{
$this->assertValidDql("FROM User u WHERE u.id NOT IN (SELECT u2.id FROM User u2 WHERE u2.name = 'zYne')");
}
publicfunctiontestSubselectInSelectPart()
{
$this->assertValidDql("SELECT u.name, (SELECT COUNT(p.id) FROM Phonenumber p WHERE p.entity_id = u.id) pcount FROM User u WHERE u.name = 'zYne' LIMIT 1");
}
publicfunctiontestPositionalInputParameter()
{
$this->assertValidDql('FROM User u WHERE u.id = ?');
}
publicfunctiontestNamedInputParameter()
{
$this->assertValidDql('FROM User u WHERE u.id = :id');