diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index c78cdb463..41794d030 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -999,8 +999,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { if (isset($this->_data[$fieldName])) { $this->_data[$fieldName] = array(); - } - if (isset($this->_references[$fieldName])) { + } else if (isset($this->_references[$fieldName])) { if ($this->_references[$fieldName] instanceof Doctrine_Record) { // todo: delete related record when saving $this $this->_references[$fieldName] = self::$_null;