find({}) v.s. deleteMany({})
find({}) seems like a find anything, but {} is. an empty set, so find an empty set give you everything. This is weird. It will be even worse when you use it in deleteMany({}), because you actually drop a collection. This is a bad idea from the beginning.
1
vote
abc
shared this idea
Hi – this is built into MongoDB functionality and is not specific to our tool. It is worth considering how it is used, as you have pointed out.