i wanted to ask what happens when collection.deleteMany{()} is executed in java without any query or empty string. Will it fail to execute (as in nothing is deleted) or will it drop the whole database?
Asked
Active
Viewed 227 times
1 Answers
0
in deleteMany()
when you execute without query it returns error
if you want to delete whole collection you could use deleteMany({})

mohammad Naimi
- 2,259
- 1
- 5
- 15
-
Whoops, i mean deletemany({}) without string/empty – Jonathan Andrew Sep 02 '21 at 11:02
-
I said the all docs in collection to be deleted – mohammad Naimi Sep 02 '21 at 13:52