1
0
mirror of synced 2024-12-13 14:56:01 +03:00
This commit is contained in:
zYne 2007-08-13 21:14:53 +00:00
parent 3bf396c06c
commit ce8fa91204

View File

@ -68,9 +68,13 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition
$alias = $this->query->getTableAlias($reference);
$table = $map['table'];
if ($this->query->getType() === Doctrine_Query::SELECT) {
$first = $conn->quoteIdentifier($alias)
. '.'
. $conn->quoteIdentifier($table->getColumnName($field));
} else {
$first = $conn->quoteIdentifier($table->getColumnName($field));
}
} else {
$first = $this->query->parseClause($first);
}
@ -126,8 +130,11 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition
$this->query->addEnumParam($value, null, null);
}
} else {
$enumIndex = false;
if (isset($table) && isset($field)) {
// check if value is enumerated value
$enumIndex = $table->enumIndex($field, trim($value, "'"));
}
if ($enumIndex !== false) {
$value = $enumIndex;