Let's take a forum example.
Each new thread is a new rootnode (level 1 node) .
- getBranch(id) just returns all nodes with the same rootnode as the node
given by id.
So this would show the whole thread.
- getSubBranch(id) returns all children of a node given by id.
This will show all replies to a post.
I think that's what you want.
Not quite. I use to manage hierarchies of people. I want to show the parents (boss) and children (you are the boss of those people).
Does the new version of NestedSet keep BC ?
- getChildren(id) returns all immediate (+1level down) children of the node
given by id
Will show all directly referring replies to a posting.
- getParents(id) get's all parents (from level n-1 to level 1) of the node
given by id.
Get the whole thread till the node given by id.
Hope this solves your problem.
Not really. To me everything below a rootid makes a tree, so i wasn't exepcting getBranch to return the whole tree but rather the path to the given node of below (like in graphs osrt of).
Arnaud.