[BUGFIX] add propertyName to _isDirty() check 45/58345/3
authorDaniel Lorenz <daniel.lorenz@extco.de>
Thu, 20 Sep 2018 08:13:34 +0000 (10:13 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 20 Sep 2018 09:33:30 +0000 (11:33 +0200)
_isDirty() without the propertyName returns false if
propertyValue is an instance of DomainObjectInterface.

Resolves: #86252
Related: #86083
Releases: master
Change-Id: I3b916f6b3a416de6cd120bd1ff0bf5cfd0926445
Reviewed-on: https://review.typo3.org/58345
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php

index 746db32..f3f6035 100644 (file)
@@ -394,7 +394,7 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
                 }
             } elseif ($propertyValue instanceof \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface
                 && $object instanceof ObjectMonitoringInterface) {
-                if ($object->_isDirty()) {
+                if ($object->_isDirty($propertyName)) {
                     if ($propertyValue->_isNew()) {
                         $this->insertObject($propertyValue, $object, $propertyName);
                     }