Skip to content

Commit 7c0d5ae

Browse files
Merge pull request #2199 from hlecorche/fix-closure-tree-v3
[Tree] Fix node primary key in ClosureTreeRepository
2 parents c80acf9 + 93f2da1 commit 7c0d5ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tree/Entity/Repository/ClosureTreeRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ public function rebuildClosure()
508508

509509
$nodeIdField = $nodeMeta->getSingleIdentifierFieldName();
510510
$newClosuresCount = $buildClosures("
511-
SELECT node.id AS ancestor, node.$nodeIdField AS descendant, 0 AS depth
511+
SELECT node.$nodeIdField AS ancestor, node.$nodeIdField AS descendant, 0 AS depth
512512
FROM {$nodeMeta->name} AS node
513513
LEFT JOIN {$closureMeta->name} AS c WITH c.ancestor = node AND c.depth = 0
514514
WHERE c.id IS NULL

0 commit comments

Comments
 (0)