A suggestion for 'Creating Documents: insertMany()'

I ran ordered query for insertMany(one provided in handouts:insertMany-ordered.js).
In lecture video, instructor’s query resulted in insertion of 2 documents, with rest three not inserted as error occurred at third document.
Running same query in my case didn’t insert any document.
On some anaylsis, I found that first document itself got into error because in previous lecture(Creating Documents: insertOne)) we had inserted similar document.

People may get confused here. So please add to the video about deleting the document from previous lecture.

Hi @Manish_75171

Thanks for flagging this as we do want to ensure confusion in any of our lessons. In the case of the lectures, you don’t need to input those into your database. The lectures are only to illustrate the concepts. We only want you to input the lab sessions. Does this make sense ?

Hope this helps!

OK, makes sense. But as you know people are more than eager to get their hands dirty, and do that as soon as they see some code/script/query to execute, hence causing these issues.

1 Like