Commit ce8fa912 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 3bf396c0
...@@ -68,9 +68,13 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition ...@@ -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'];
if ($this->query->getType() === Doctrine_Query::SELECT) {
$first = $conn->quoteIdentifier($alias) $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 ...@@ -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 {
$enumIndex = false;
if (isset($table) && isset($field)) {
// check if value is enumerated value // check if value is enumerated value
$enumIndex = $table->enumIndex($field, trim($value, "'")); $enumIndex = $table->enumIndex($field, trim($value, "'"));
}
if ($enumIndex !== false) { if ($enumIndex !== false) {
$value = $enumIndex; $value = $enumIndex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment