Browse Source

fixed TREE repository for inheritance support on parent update

gediminasm 14 năm trước cách đây
mục cha
commit
71c888fcf2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);