Pārlūkot izejas kodu

Ensure parent is initialized before node update

craig 12 gadi atpakaļ
vecāks
revīzija
eaccdb2c95

+ 3 - 0
lib/Gedmo/Tree/Strategy/AbstractMaterializedPath.php

@@ -273,6 +273,9 @@ abstract class AbstractMaterializedPath implements Strategy
         $path .= $config['path_separator'];
 
         if ($parent) {
+            // Ensure parent has been initialized in the case where it's a proxy
+            $om->initializeObject($parent);
+            
             $changeSet = $uow->isScheduledForUpdate($parent) ? $ea->getObjectChangeSet($uow, $parent) : false;
             $pathOrPathSourceHasChanged = $changeSet && (isset($changeSet[$config['path_source']]) || isset($changeSet[$config['path']]));