From 635f1a9c8fbf0970004be64e049d07f4e572fa5b Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 13 Aug 2007 22:01:27 +0000 Subject: [PATCH] fixes #420 --- lib/Doctrine/Record.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index feed3fe04..89c6d3dff 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -837,14 +837,14 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count $lower = strtolower($name); $lower = $this->_table->getColumnName($lower); - - $type = $this->_table->getTypeOf($name); if (isset($this->_data[$lower])) { - if ($value instanceof Doctrine_Record && $type != 'object') { + if ($value instanceof Doctrine_Record) { + $type = $this->_table->getTypeOf($name); + $id = $value->getIncremented(); - if ($id !== null) { + if ($id !== null && $type !== 'object') { $value = $id; } }