1
0
mirror of synced 2025-01-29 19:41:45 +03:00

Merge pull request #202 from realestateconz/master

Fixed array flip breaking discriminator map SQL generation
This commit is contained in:
Guilherme Blanco 2011-11-22 18:36:30 -08:00
commit bfcea9460b

View File

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