You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first pushed element became userId now but the 2nd element is an array.
If the current behavior is a bug, please provide the steps to reproduce.
Please use above lines to reproduce.
What is the expected behavior?
expecting all the elements are "userId" instead of seeing an array for the latest pushed element.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
"mongoose": "^5.10.5",
MongoDB v4.2.6
Node.js v12.16.2
The text was updated successfully, but these errors were encountered:
vkarpov15
added
needs repro script
Maybe a bug, but no repro script. The issue reporter should create a script that demos the issue
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
and removed
needs repro script
Maybe a bug, but no repro script. The issue reporter should create a script that demos the issue
labels
Sep 22, 2020
Yes, I am using 5.10.5
Do you want to request a feature or report a bug?
report a bug or maybe I just defined the schema wrongly?
What is the current behavior?
I want to define an array that contains multiple arrays, such as:
Here is my schema:
The way I initialize the array:
From Atlas, I can see it correctly as:
After push the first element to the array using the following:
I got
You can see the pushed "userId" is showing as an array.
After pushing the 2nd element. The array became:
The first pushed element became userId now but the 2nd element is an array.
If the current behavior is a bug, please provide the steps to reproduce.
Please use above lines to reproduce.
What is the expected behavior?
expecting all the elements are "userId" instead of seeing an array for the latest pushed element.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
"mongoose": "^5.10.5",
MongoDB v4.2.6
Node.js v12.16.2
The text was updated successfully, but these errors were encountered: