add Model.query support