-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Push to document array fails #8312
Comments
I experienced the same issue, specifically in version 5.7.8 vs. 5.7.7. It seems there is a bug in the latest patch release. Reverting to 5.7.7 fixed the issue for me, but I would anticipate others are going to continue to experience this bug in 5.7.8. I believe it may be related to 9b0e96d . |
Facing same issue, reverting to 5.7.7 fixed it for me as well. It is occuring when pushing to a document array placed within a findOne query. Here are my error logs: events.js:174 |
Should be fixed by #8351 in 5.7.12 |
@vkarpov15
Is this related to this issue? Am I doing something wrong? EDIT: |
@nbcraft the issue you're experiencing looks slightly different, looks like a different error message. Can you please open up a separate issue and follow the issue template? |
This behavior exists in version 5.7.8
This behavior does not exist in version 5.6.9
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
story is a complex document with many subdocuments and subdocuments arrays
let obj = story.segmentation // this is a subdocument array
let segmentation = {
// json object contains fields according to Segmentation model
}
obj.push(segmentation)
Error output:
What is the expected behavior?
array.push is successful
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node v12.10.0
Mongoose v5.7.8
MongoDB v3.3.0
The text was updated successfully, but these errors were encountered: