Let nodes of tree be {(k,):Node(identifier=(k,))}, k=1,2,3...
I want to transform it to a new tree with nodes {(0,k):Node(identifier=(0,k))}, k=1,2,3...
What should I do?
The problem is from the case when I paste a new_tree to a tree, with duplicated nid. What I want is that, when I set identifier of a node, the key (nid) of the node in the tree can be changed automatically, meanwhile the _predecessor and _successors of the neighbors of the node also should be changed.
Let nodes of tree be {(k,):Node(identifier=(k,))}, k=1,2,3...
I want to transform it to a new tree with nodes {(0,k):Node(identifier=(0,k))}, k=1,2,3...
What should I do?
The problem is from the case when I paste a new_tree to a tree, with duplicated nid. What I want is that, when I set identifier of a node, the key (nid) of the node in the tree can be changed automatically, meanwhile the _predecessor and _successors of the neighbors of the node also should be changed.