1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Reverted PR which broke suite. Issue is still valid, but it requires more investigation.

This commit is contained in:
Guilherme Blanco 2011-11-23 08:40:47 -05:00
parent bfcea9460b
commit ef33454301
2 changed files with 9 additions and 3 deletions

View File

@ -120,10 +120,10 @@ class SingleTablePersister extends AbstractEntityInheritancePersister
$values[] = $this->_conn->quote($this->_class->discriminatorValue); $values[] = $this->_conn->quote($this->_class->discriminatorValue);
} }
$discrValues = array_keys($this->_class->discriminatorMap); $discrValues = array_flip($this->_class->discriminatorMap);
foreach ($this->_class->subClasses as $i => $subclassName) { foreach ($this->_class->subClasses as $subclassName) {
$values[] = $this->_conn->quote($discrValues[$i]); $values[] = $this->_conn->quote($discrValues[$subclassName]);
} }
$conditionSql .= $this->_getSQLTableAlias($this->_class->name) . '.' . $this->_class->discriminatorColumn['name'] $conditionSql .= $this->_getSQLTableAlias($this->_class->name) . '.' . $this->_class->discriminatorColumn['name']

View File

@ -2202,6 +2202,12 @@ class UnitOfWork implements PropertyChangedListener
if (isset($class->associationMappings[$class->identifier[0]])) { if (isset($class->associationMappings[$class->identifier[0]])) {
$idHash = $data[$class->associationMappings[$class->identifier[0]]['joinColumns'][0]['name']]; $idHash = $data[$class->associationMappings[$class->identifier[0]]['joinColumns'][0]['name']];
} else { } else {
/*echo $className;
\Doctrine\Common\Util\Debug::dump($data);
\Doctrine\Common\Util\Debug::dump($class->identifier);
ob_end_flush();
ob_start();*/
$idHash = $data[$class->identifier[0]]; $idHash = $data[$class->identifier[0]];
} }
$id = array($class->identifier[0] => $idHash); $id = array($class->identifier[0] => $idHash);