Query constructor should take query object, not just criteria