This commit is contained in:
parent
e81891e310
commit
3b48b7911c
@ -60,13 +60,15 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition
|
|||||||
} else {
|
} else {
|
||||||
if ( ! is_numeric($func)) {
|
if ( ! is_numeric($func)) {
|
||||||
$a = explode('.', $func);
|
$a = explode('.', $func);
|
||||||
$field = array_pop($a);
|
|
||||||
if (count($a) > 1) {
|
if (count($a) > 1) {
|
||||||
|
$field = array_pop($a);
|
||||||
$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 {
|
} else {
|
||||||
|
$field = end($a);
|
||||||
$func = $this->query->getAggregateAlias($field);
|
$func = $this->query->getAggregateAlias($field);
|
||||||
}
|
}
|
||||||
return $func;
|
return $func;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user