use existing method to check for lazyLoaded properties instead of repeating the detec...
authorFranz Koch <typo3@elements-net.de>
Mon, 21 Jun 2010 15:52:58 +0000 (15:52 +0000)
committerFranz Koch <typo3@elements-net.de>
Mon, 21 Jun 2010 15:52:58 +0000 (15:52 +0000)
typo3/sysext/extbase/Classes/Persistence/Backend.php

index de911ac..8a02374 100644 (file)
@@ -477,10 +477,7 @@ class Tx_Extbase_Persistence_Backend implements Tx_Extbase_Persistence_BackendIn
 
                        $properties = $object->_getProperties();
                        foreach ($properties as $propertyName => $propertyValue) {
-                               if (!$dataMap->isPersistableProperty($propertyName)) continue;
-                               if (($propertyValue instanceof Tx_Extbase_Persistence_LazyLoadingProxy) || ((get_class($propertyValue) === 'Tx_Extbase_Persistence_LazyObjectStorage') && ($propertyValue->isInitialized() === FALSE))) {
-                                       continue;
-                               }
+                               if (!$dataMap->isPersistableProperty($propertyName) || $this->propertyValueIsLazyLoaded($propertyValue)) continue;
 
                                $columnMap = $dataMap->getColumnMap($propertyName);
                                $propertyMetaData = $classSchema->getProperty($propertyName);