1
0
mirror of synced 2024-12-14 15:16:04 +03:00
This commit is contained in:
zYne 2007-04-24 10:15:17 +00:00
parent bc24aafd87
commit 92a6699e9a

View File

@ -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;