Allow to create a tree from array
Set parent relation on children when converting to tree