1
0
mirror of synced 2025-03-28 10:53:49 +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)) { if ( ! is_numeric($func)) {
$a = explode('.', $func); $a = explode('.', $func);
$field = array_pop($a); $field = array_pop($a);
$reference = implode('.', $a); if (count($a) > 1) {
$table = $this->query->load($reference, false); $reference = implode('.', $a);
$field = $table->getColumnName($field); $table = $this->query->load($reference, false);
$func = $this->query->getTableAlias($reference) . '.' . $field; $field = $table->getColumnName($field);
$func = $this->query->getTableAlias($reference) . '.' . $field;
} else {
$func = $this->query->getAggregateAlias($field);
}
return $func; return $func;
} else { } else {
return $func; return $func;