When using insertOne(), the console reports success, but no records appear

Basically what it says in the title.

I think I figured out what happened - I now have 3 collections in my database: movieDetails, movieScratch, and moviesScratch. The moviesScratch only contains the records created through the Compass interface, while movieScratch only contains several copies of Star Trek II.

IE, if you type the name of the collection wrong in the db.<collection_name>.insertOne command, it must silently create a new one. This was confusing, I figured I’d type it up in case anyone else stumbles over it.

1 Like

Thank you. I will have to keep that in mind. Very subtle error but would have me pull out my hair!