Skip to content
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

Make $__reset() not mark paths as init #11770

Closed
vkarpov15 opened this issue May 4, 2022 · 0 comments · Fixed by #11902
Closed

Make $__reset() not mark paths as init #11770

vkarpov15 opened this issue May 4, 2022 · 0 comments · Fixed by #11902
Milestone

Comments

@vkarpov15
Copy link
Collaborator

Do you want to request a feature or report a bug?

Potential bug/issue

What is the current behavior?

It is very strange that $__reset(), which should reset a document to a "nothing modified" state, relies on marking subdocuments as init. This popped up in #11672, and this behavior may be hiding other bugs. No concrete issues right now, more of a note to self to investigate further.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.

@vkarpov15 vkarpov15 added this to the 6.3.6 milestone May 4, 2022
vkarpov15 added a commit that referenced this issue Jun 6, 2022
@vkarpov15 vkarpov15 modified the milestones: 6.3.6, 6.3.7, 6.4 Jun 7, 2022
vkarpov15 added a commit that referenced this issue Jun 13, 2022
fix: make `doValidate()` on document array elements run validation on the whole subdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant