Explorar o código

fixed TREE repository for inheritance support on parent update

gediminasm %!s(int64=14) %!d(string=hai) anos
pai
achega
71c888fcf2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Gedmo/Tree/Repository/TreeNodeRepository.php

+ 1 - 1
lib/Gedmo/Tree/Repository/TreeNodeRepository.php

@@ -655,7 +655,7 @@ class TreeNodeRepository extends EntityRepository
                 $this->_sync($config, 2, '+', '>= ' . $parentRightValue);
                 // cannot schedule this update if other Nodes pending
                 $qb = $this->_em->createQueryBuilder();
-                $qb->update($this->_entityName, 'node')
+                $qb->update($meta->rootEntityName, 'node')
                     ->set('node.' . $leftField, $parentRightValue)
                     ->set('node.' . $rightField, $parentRightValue + 1);
                 $entityIdentifiers = $meta->getIdentifierValues($node);