[2.0][DDC-416] Fixed.
This commit is contained in:
parent
91ac6fae3e
commit
76663a0501
@ -398,7 +398,11 @@ class JoinedSubclassPersister extends StandardEntityPersister
|
|||||||
$conditionSql = '';
|
$conditionSql = '';
|
||||||
foreach ($criteria as $field => $value) {
|
foreach ($criteria as $field => $value) {
|
||||||
if ($conditionSql != '') $conditionSql .= ' AND ';
|
if ($conditionSql != '') $conditionSql .= ' AND ';
|
||||||
$conditionSql .= $baseTableAlias . '.';
|
if (isset($this->_class->fieldMappings[$field]['inherited'])) {
|
||||||
|
$conditionSql .= $this->_getSQLTableAlias($this->_em->getClassMetadata($this->_class->fieldMappings[$field]['inherited'])) . '.';
|
||||||
|
} else {
|
||||||
|
$conditionSql .= $baseTableAlias . '.';
|
||||||
|
}
|
||||||
if (isset($this->_class->columnNames[$field])) {
|
if (isset($this->_class->columnNames[$field])) {
|
||||||
$conditionSql .= $this->_class->getQuotedColumnName($field, $this->_platform);
|
$conditionSql .= $this->_class->getQuotedColumnName($field, $this->_platform);
|
||||||
} else if ($assoc !== null) {
|
} else if ($assoc !== null) {
|
||||||
|
@ -71,6 +71,12 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
|||||||
|
|
||||||
$this->_em->clear();
|
$this->_em->clear();
|
||||||
|
|
||||||
|
$guilherme = $this->_em->getRepository(get_class($employee))->findOneBy(array('name' => 'Guilherme Blanco'));
|
||||||
|
$this->assertTrue($guilherme instanceof CompanyEmployee);
|
||||||
|
$this->assertEquals('Guilherme Blanco', $guilherme->getName());
|
||||||
|
|
||||||
|
$this->_em->clear();
|
||||||
|
|
||||||
$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');
|
||||||
|
Loading…
Reference in New Issue
Block a user