1
0
mirror of synced 2024-12-13 06:46:03 +03:00
This commit is contained in:
romanb 2007-12-12 16:21:54 +00:00
parent 79b79909ad
commit 1446447107
2 changed files with 4 additions and 5 deletions

View File

@ -757,11 +757,11 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
. $this->_conn->quoteIdentifier($field);
} else {
// build sql expression
$field = $this->getRoot()->getColumnName($field);
$term[0] = $this->_conn->quoteIdentifier($field);
}
}
} else {
if ( ! empty($term[0]) &&
! in_array(strtoupper($term[0]), self::$_keywords) &&
! is_numeric($term[0])) {
@ -775,13 +775,12 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
$table = $this->_queryComponents[$componentAlias]['table'];
// check column existence
if ($table->hasColumn($term[0])) {
if ($table->hasField($term[0])) {
$found = true;
$def = $table->getDefinitionOf($term[0]);
// get the actual column name from alias
// get the actual column name from field name
$term[0] = $table->getColumnName($term[0]);

View File

@ -77,7 +77,7 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition
}
}
$first = $this->query->parseClause($first);
$sql = $first . ' ' . $operator . ' ' . $this->parseValue($value, $table, $field);
return $sql;