[BUGFIX] Extbase: Methods are inherited twice 45/28745/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Tue, 25 Mar 2014 10:17:50 +0000 (11:17 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 25 Mar 2014 13:43:20 +0000 (14:43 +0100)
Change #57031 introduced two methods in DomainObjectInterface,
which are already present in ObjectMonitoringInterface.

Undo that change.

Resolves: #57271
Releases: 6.2
Change-Id: I95852d8221a1b54c4d6a71c508666e0fb1080223
Reviewed-on: https://review.typo3.org/28745
Reviewed-by: Xavier Perseguers
Reviewed-by: Helmut Hummel
Tested-by: Markus Klein
Reviewed-by: Markus Klein
typo3/sysext/extbase/Classes/DomainObject/DomainObjectInterface.php
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php

index f9e18b5..7deb5aa 100644 (file)
@@ -98,22 +98,4 @@ interface DomainObjectInterface {
         * @return mixed The clean property value or NULL
         */
        public function _getCleanProperty($propertyName);
-
-       /**
-        * Returns TRUE if the properties were modified after reconstitution
-        *
-        * @param string $propertyName An optional name of a property to be checked if its value is dirty
-        * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\TooDirtyException
-        * @return boolean
-        */
-       public function _isDirty($propertyName = NULL);
-
-       /**
-        * Register an object's clean state, e.g. after it has been reconstituted
-        * from the database.
-        *
-        * @param string $propertyName The name of the property to be memorized. If omitted all persistable properties are memorized.
-        * @return void
-        */
-       public function _memorizeCleanState($propertyName = NULL);
 }
index db5e239..66f35d6 100644 (file)
@@ -29,6 +29,7 @@ namespace TYPO3\CMS\Extbase\Persistence\Generic;
  ***************************************************************/
 
 use TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface;
+use TYPO3\CMS\Extbase\Persistence\ObjectMonitoringInterface;
 
 /**
  * A persistence backend. This backend maps objects to the relational model of the storage backend.
@@ -361,7 +362,8 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
                                                $queue[] = $containedObject;
                                        }
                                }
-                       } elseif ($propertyValue instanceof \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface) {
+                       } elseif ($propertyValue instanceof \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface
+                               && $object instanceof ObjectMonitoringInterface) {
                                if ($object->_isDirty($propertyName)) {
                                        if ($propertyValue->_isNew()) {
                                                $this->insertObject($propertyValue, $object, $propertyName);