Added parent query for tree.