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);
|
$alias = $this->query->getTableAlias($reference);
|
||||||
$table = $map['table'];
|
$table = $map['table'];
|
||||||
|
|
||||||
$first = $conn->quoteIdentifier($alias)
|
if ($this->query->getType() === Doctrine_Query::SELECT) {
|
||||||
. '.'
|
$first = $conn->quoteIdentifier($alias)
|
||||||
. $conn->quoteIdentifier($table->getColumnName($field));
|
. '.'
|
||||||
|
. $conn->quoteIdentifier($table->getColumnName($field));
|
||||||
|
} else {
|
||||||
|
$first = $conn->quoteIdentifier($table->getColumnName($field));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$first = $this->query->parseClause($first);
|
$first = $this->query->parseClause($first);
|
||||||
}
|
}
|
||||||
@ -126,8 +130,11 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition
|
|||||||
$this->query->addEnumParam($value, null, null);
|
$this->query->addEnumParam($value, null, null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// check if value is enumerated value
|
$enumIndex = false;
|
||||||
$enumIndex = $table->enumIndex($field, trim($value, "'"));
|
if (isset($table) && isset($field)) {
|
||||||
|
// check if value is enumerated value
|
||||||
|
$enumIndex = $table->enumIndex($field, trim($value, "'"));
|
||||||
|
}
|
||||||
|
|
||||||
if ($enumIndex !== false) {
|
if ($enumIndex !== false) {
|
||||||
$value = $enumIndex;
|
$value = $enumIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user