Fixed bug in tree query with bootstrapped database
This commit is contained in:
parent
00770fcd25
commit
9cf5c5f23f
1 changed files with 1 additions and 1 deletions
2
node.go
2
node.go
|
|
@ -149,7 +149,7 @@ func GetNodeTree(startNodeID, maxDepth int, withData bool) (topNode *Node, err e
|
|||
n.id,
|
||||
ns.depth+1 AS depth
|
||||
FROM node n
|
||||
INNER JOIN nodes ns ON ns.depth < $2 AND n.parent_id = ns.id
|
||||
INNER JOIN nodes ns ON ns.depth < $2 AND n.parent_id = ns.id AND n.id != ns.id
|
||||
)
|
||||
|
||||
SEARCH DEPTH FIRST BY id SET ordercol
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue