This question is a follow up to this post:
What is the most efficient/elegant way to parse a flat table into a tree?
I liked the ClosureMap solution, but I have an additional problem to solve.
How can you easily retrieve the path to a particular node in a tree? For example, if you look at the tree provided:
ID Node Name
1    'Node 1'
 2    'Node 1.1'
 3    'Node 2'
 4    'Node 1.1.1'
 5    'Node 2.1'
 6    'Node 1.2'          
The path to 1.1.1 would be:
ID = 1, 2, 4
Without doing recursive SQL calls, is there an elegant way to retrieve a path?
 
     
    