Просмотр исходного кода

Ensure parent is initialized before node update

craig 12 лет назад
Родитель
Сommit
eaccdb2c95
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      lib/Gedmo/Tree/Strategy/AbstractMaterializedPath.php

+ 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']]));