[2.0] DDC-370 - Fixed bug with CTI and scalar fields DDC-377 - Fixed failing Oracle test
This commit is contained in:
parent
839603dafe
commit
5bf169202f
@ -815,8 +815,14 @@ class SqlWalker implements TreeWalker
|
||||
} else {
|
||||
$resultAlias = $selectExpression->fieldIdentificationVariable;
|
||||
}
|
||||
|
||||
if ($class->isInheritanceTypeJoined()) {
|
||||
$tableName = $this->_em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName);
|
||||
} else {
|
||||
$tableName = $class->getTableName();
|
||||
}
|
||||
|
||||
$sqlTableAlias = $this->getSqlTableAlias($class->getTableName(), $dqlAlias);
|
||||
$sqlTableAlias = $this->getSqlTableAlias($tableName, $dqlAlias);
|
||||
$columnName = $class->getQuotedColumnName($fieldName, $this->_platform);
|
||||
|
||||
$columnAlias = $this->getSqlColumnAlias($columnName);
|
||||
|
@ -28,7 +28,7 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
{
|
||||
$dql = 'SELECT p.department, AVG(p.salary) AS avgSalary '.
|
||||
'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '.
|
||||
'GROUP BY p.department HAVING SUM(p.salary) > 200000';
|
||||
'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department';
|
||||
|
||||
$result = $this->_em->createQuery($dql)->getScalarResult();
|
||||
|
||||
@ -97,22 +97,23 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->assertEquals('Roman B.', $result[0]['name']);
|
||||
}
|
||||
|
||||
/*public function testGroupByMultipleFields()
|
||||
public function testGroupByMultipleFields()
|
||||
{
|
||||
$dql = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p '.
|
||||
'GROUP BY p.department, p.name';
|
||||
$result = $this->_em->createQuery($dql)->getResult();
|
||||
}*/
|
||||
|
||||
/**
|
||||
$this->assertEquals(4, count($result));
|
||||
}
|
||||
|
||||
public function testUpdateAs()
|
||||
{
|
||||
$dql = 'UPDATE Doctrine\Tests\Models\Company\CompanyEmployee AS p SET p.salary = 1';
|
||||
$this->_em->createQuery($dql)->getResult();
|
||||
|
||||
$this->assertTrue(count($this->_em->createQuery(
|
||||
'SELECT count(p) FROM Doctrine\Tests\Models\Company\CompanyEmployee p WHERE p.salary = 1')->getResult()) > 0);
|
||||
}*/
|
||||
'SELECT count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p WHERE p.salary = 1')->getResult()) > 0);
|
||||
}
|
||||
|
||||
/*public function testDeleteAs()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user