This commit is contained in:
parent
3bf396c06c
commit
ce8fa91204
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user