[2.0][DDC-368] Fixed.
This commit is contained in:
parent
cbd8133308
commit
1e6641565e
@ -152,7 +152,7 @@ class MultiTableUpdateExecutor extends AbstractSqlExecutor
|
|||||||
|
|
||||||
// Execute UPDATE statements
|
// Execute UPDATE statements
|
||||||
for ($i=0, $count=count($this->_sqlStatements); $i<$count; ++$i) {
|
for ($i=0, $count=count($this->_sqlStatements); $i<$count; ++$i) {
|
||||||
$conn->executeUpdate($this->_sqlStatements[$i], $this->_sqlParameters[$i]);
|
$conn->executeUpdate($this->_sqlStatements[$i], isset($this->_sqlParameters[$i]) ? $this->_sqlParameters[$i] : array());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Drop temporary table
|
// Drop temporary table
|
||||||
|
@ -71,7 +71,6 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
|||||||
|
|
||||||
$this->_em->clear();
|
$this->_em->clear();
|
||||||
|
|
||||||
//TODO: Test bulk UPDATE
|
|
||||||
$query = $this->_em->createQuery("update Doctrine\Tests\Models\Company\CompanyEmployee p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
|
$query = $this->_em->createQuery("update Doctrine\Tests\Models\Company\CompanyEmployee p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
|
||||||
$query->setParameter(1, 'NewName');
|
$query->setParameter(1, 'NewName');
|
||||||
$query->setParameter(2, 'NewDepartment');
|
$query->setParameter(2, 'NewDepartment');
|
||||||
@ -275,4 +274,18 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
|||||||
$this->assertFalse($mainEvent instanceof \Doctrine\ORM\Proxy\Proxy);
|
$this->assertFalse($mainEvent instanceof \Doctrine\ORM\Proxy\Proxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group DDC-368
|
||||||
|
*/
|
||||||
|
public function testBulkUpdateIssueDDC368()
|
||||||
|
{
|
||||||
|
$dql = 'UPDATE Doctrine\Tests\Models\Company\CompanyEmployee AS p SET p.salary = 1';
|
||||||
|
$this->_em->createQuery($dql)->execute();
|
||||||
|
|
||||||
|
$this->assertTrue(count($this->_em->createQuery(
|
||||||
|
'SELECT count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p WHERE p.salary = 1')
|
||||||
|
->getResult()) > 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user