1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Fixed array_flip breaking discriminator map SQL generation

This commit is contained in:
warezthebeef 2011-11-23 12:15:23 +13:00
parent be4eb63c62
commit b80ef58cab

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;
}
}
}