[SERVER-57436] mongoDB insert unwanted value in a first order array entry when I insertOne, updateOne or save Created: 04/Jun/21 Updated: 10/Jun/21 Resolved: 09/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Network Platform | Assignee: | Edwin Zhou |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | What do I use :
Collection params :
Sequence :
Driver code :
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: |
| Description |
|
When I insert a document in a collection on mongoDB Atlas via the nodeJs driver some array gets new entry from the previouly delete. Sometime it is null or a duplicate. It would not happen on all the entry of array type. This concerne as far as I know text items and object items.
|
| Comments |
| Comment by Network Platform [ 10/Jun/21 ] |
|
Hi Edwin, I find a way to make it worked. I restructured my json. Now those first order array are second order. In that case, arrays are not modified. I check every method and data, it does not come from my code. Regards, Mathieu |
| Comment by Edwin Zhou [ 09/Jun/21 ] |
|
Thanks for your report. Please note that the SERVER project is for bugs and feature suggestions for the MongoDB server. As this ticket does not appear to be a bug, I will now close it. If you need further assistance troubleshooting, I encourage you to ask our community by posting on the MongoDB Developer Community Forums. Best, |
| Comment by Network Platform [ 04/Jun/21 ] |
|
As we can't edit the ticket and I miss fire the validation when I was typing. I will follow my explanation in this comment : I double-checked and the doc object is not malformed and does not contain unwanted values. First API call : From "language": ["EN", "FR"], to "language": ["EN", "FR", null, null], From "purpose": [\{"name": "stem and leaf plot","coef": 1}], to "purpose": [\{"name": "stem and leaf plot","coef": 1}, \{"name": "stem and leaf plot","weight": 1}], From "integration": ["microsoft excel"] to "integration": ["microsoft excel", "microsoft excel"] I have tried many methods such as :
In each case I obtain duplicate item for these three array of my document. I came to the conclusion that it was an over writing problem. I try with a different document but the same property_name and even if the language array was not in the command MongoDB creates an entry for it. This was the worst case.
|