Skip to content

Commit 5abc6a4

Browse files
committed
this fixes the issue although I am not 100% sure why
Signed-off-by: Stefan Gehrig <[email protected]>
1 parent 883f84d commit 5abc6a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Tree/Strategy/ORM/Nested.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ public function updateNode(EntityManagerInterface $em, $node, $parent, $position
407407
$wrapped->setPropertyValue($config['right'], $right);
408408
}
409409
$newRoot = $parentRoot;
410+
411+
if (!isset($this->treeEdges[$meta->getName()])) {
412+
$this->treeEdges[$meta->getName()] = $this->max($em, $config['useObjectClass'], $newRoot) + 1;
413+
}
414+
$this->treeEdges[$meta->getName()] += 2;
410415
} elseif (!isset($config['root'])
411416
|| ($meta->isSingleValuedAssociation($config['root']) && null !== $parent && ($newRoot = $meta->getFieldValue($node, $config['root'])))) {
412417
if (!isset($this->treeEdges[$meta->getName()])) {

0 commit comments

Comments
 (0)