Enhanced the query interface of the Model class