Added random test for ParentQuery and ChildrenQuery.