Hibernate supports a modified pre-order tree trace that allows you to define left / right properties. However, it does not support hierarchical queries, but it is rather trivial to re-hierarchize objects from a linear query if you order it by the left value.