From b0c7dce47f19d5861c293510f203e2daba012ca1 Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 29 Oct 2007 23:34:10 +0000 Subject: [PATCH] fixed record state handling with aggregate values --- lib/Doctrine/Record.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index d255afbd6..1ed0ff93b 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -175,7 +175,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count $this->prepareIdentifiers($exists); if ( ! $exists) { - if ($count > 0) { + if ($count > count($this->_values)) { $this->_state = Doctrine_Record::STATE_TDIRTY; } else { $this->_state = Doctrine_Record::STATE_TCLEAN;