insertMany don´t make changes on the db

I put the code but it doesn´t appear on atlas inside the moviesScratch

Your ninserted is zero
because of duplicates in your data

Please read ordered and unordered inserts

Yeah I noticed that, but at least it should not appear the 2 at the top?

Pd: Sorry, I understand now, I had the _id already created on my collection that’s why when I tried to insertMany with the ordered one didn’t inserted anything.

I just removed the object _id:“tt0084726” that I had inside the collection and it worked with the ordered one, and then the unordered worked fine too.

1 Like

Hi @Edmundo_92011,

I’m glad your issue got resolved.

For any other users who might be having similar doubts, please read more about the ordered and unordered insert here.

~ Shubham

1 Like