From 04276090b583757a7e0574f64ce263374975f111 Mon Sep 17 00:00:00 2001 From: pookey Date: Sun, 10 Feb 2008 14:49:22 +0000 Subject: [PATCH] fixes #732 - yes, it's a nasty hack, but we have a new parser on the way --- lib/Doctrine/Query/Having.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Doctrine/Query/Having.php b/lib/Doctrine/Query/Having.php index 234cd70c0..01dc6f0f0 100644 --- a/lib/Doctrine/Query/Having.php +++ b/lib/Doctrine/Query/Having.php @@ -93,6 +93,10 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition $operator = array_shift($tokens); $value = implode(' ', $tokens); $part .= ' ' . $operator . ' ' . $value; + // check the RHS for aggregate functions + if (strpos($value, '(') !== false) { + $value = $this->parseAggregateFunction($value); + } return $part; } }