Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Jennifer-Jia opened this issue Nov 23, 2023 · 1 comment
Closed

Comments

@Jennifer-Jia
Copy link

Jennifer-Jia commented Nov 23, 2023

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.

@bagerard
Copy link
Collaborator

Duplicate of #2462

@bagerard bagerard marked this as a duplicate of #2462 Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants