Added ability to add a where clause to a subquery of the object being queried