Add support for updating multiple instances with query