[+BUGFIX] Extbase (Persistence): Follow up.
authorJochen Rau <j.rau@web.de>
Sat, 7 Nov 2009 17:29:56 +0000 (17:29 +0000)
committerJochen Rau <j.rau@web.de>
Sat, 7 Nov 2009 17:29:56 +0000 (17:29 +0000)
typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php
typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php

index 1669816..3f04032 100644 (file)
@@ -134,7 +134,7 @@ abstract class Tx_Extbase_DomainObject_AbstractDomainObject implements Tx_Extbas
         * @return boolean
         */
        public function _isNew() {
-               return ($this->uid === NULL) || $this->_isClone();
+               return $this->uid === NULL;
        }
 
        /**
index 16115bf..f3095e0 100644 (file)
@@ -277,6 +277,7 @@ class Tx_Extbase_Persistence_ObjectStorage implements Iterator, Countable, Array
                        $clonedStorage = array();
                        foreach ($this->storage as $object) {
                                if ($object instanceof Tx_Extbase_DomainObject_AbstractDomainObject) {
+                                       $object->_setProperty('uid', NULL);
                                        $clonedStorage[] = clone $object;
                                }
                        }