mongoengine - Ignore extra fields for schema validation

前端 未结 4 729
轮回少年
轮回少年 2021-02-03 21:11

I am trying to query my database. Some records currently have extra fields that are not included in my model schema (by error, but I want to handle these cases). When I try to q

4条回答
  •  执念已碎
    2021-02-03 21:35

    I think you want skip schema validation, so when you save your document

    document_name.save(validate=False)
    

提交回复
热议问题