Commit 92a6699e authored by zYne's avatar zYne

--no commit message

--no commit message
parent bc24aafd
...@@ -61,11 +61,14 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition ...@@ -61,11 +61,14 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition
if ( ! is_numeric($func)) { if ( ! is_numeric($func)) {
$a = explode('.', $func); $a = explode('.', $func);
$field = array_pop($a); $field = array_pop($a);
if (count($a) > 1) {
$reference = implode('.', $a); $reference = implode('.', $a);
$table = $this->query->load($reference, false); $table = $this->query->load($reference, false);
$field = $table->getColumnName($field); $field = $table->getColumnName($field);
$func = $this->query->getTableAlias($reference) . '.' . $field; $func = $this->query->getTableAlias($reference) . '.' . $field;
} else {
$func = $this->query->getAggregateAlias($field);
}
return $func; return $func;
} else { } else {
return $func; return $func;
......
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