浏览代码

fixed TREE repository for inheritance support on parent update

gediminasm 14 年之前
父节点
当前提交
71c888fcf2
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);