mongoengine icon indicating copy to clipboard operation
mongoengine copied to clipboard

The method document.save() will unseted fields that equal default

Open Jennifer-Jia opened this issue 9 months ago • 0 comments

The method document.save() will unset fields if that equal ""/[]/{} and equal default. This causes me a lot of trouble. When I get data in mongo through other tools, I can't get the fields and need to set the default value in code. When performing data query, the query conditions will also be affected because the fields will be unset. I hope the method can provide parameters to control whether to unset fields.

Jennifer-Jia avatar Nov 23 '23 08:11 Jennifer-Jia