Bug #449935 - Need to add control over direction of traversal for hierarchical queries

Signed-off-by: Petros Splinakis <petros.splinakis@oracle.com>
Reviewed-by: Lukas Jungmann