This commit is contained in:
parent
bc24aafd87
commit
92a6699e9a
@ -61,11 +61,14 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition
|
||||
if ( ! is_numeric($func)) {
|
||||
$a = explode('.', $func);
|
||||
$field = array_pop($a);
|
||||
$reference = implode('.', $a);
|
||||
$table = $this->query->load($reference, false);
|
||||
$field = $table->getColumnName($field);
|
||||
$func = $this->query->getTableAlias($reference) . '.' . $field;
|
||||
|
||||
if (count($a) > 1) {
|
||||
$reference = implode('.', $a);
|
||||
$table = $this->query->load($reference, false);
|
||||
$field = $table->getColumnName($field);
|
||||
$func = $this->query->getTableAlias($reference) . '.' . $field;
|
||||
} else {
|
||||
$func = $this->query->getAggregateAlias($field);
|
||||
}
|
||||
return $func;
|
||||
} else {
|
||||
return $func;
|
||||
|
Loading…
Reference in New Issue
Block a user