[+BUGFIX] Extbase (Persistence): DataMapper::thawProperties() called getValue() twice...
authorJochen Rau <j.rau@web.de>
Tue, 19 Jan 2010 00:06:01 +0000 (00:06 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 19 Jan 2010 00:06:01 +0000 (00:06 +0000)
typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php

index 86eb86c..40a0879 100644 (file)
@@ -203,10 +203,9 @@ class Tx_Extbase_Persistence_Mapper_DataMapper implements t3lib_Singleton {
                                }
                                break;
                                case (Tx_Extbase_Persistence_PropertyType::REFERENCE):
-                                       if (is_null($row->getValue($columnName))) {
-                                               $propertyValue = NULL;
-                                       } else {
-                                               $fieldValue = $row->getValue($columnMap->getColumnName());
+                                       $propertyValue = $row->getValue($columnName);
+                                       if (!is_null($propertyValue)) {
+                                               $fieldValue = $row->getValue($columnName);
                                                $result = $this->fetchRelated($object, $propertyName, $fieldValue);
                                                $propertyValue = $this->mapResultToPropertyValue($object, $propertyName, $result);
                                        }