Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
*Location*: http://docs.mongodb.org/manual/reference/method/db.collection.remove/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36
*Referrer*: https://www.google.co.in/
*Screen Resolution*: 2048 x 1152
*repo*: docs
*source*: reference/method/db.collection.remove
*Location*: http://docs.mongodb.org/manual/reference/method/db.collection.remove/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36 *Referrer*: https://www.google.co.in/ *Screen Resolution*: 2048 x 1152 *repo*: docs *source*: reference/method/db.collection.remove
Description
why does "remove" delete all matching records by default? dont you think the default option should be to delete only first matching record and if required user will pass "false" for second parameter to remove all records.
im new to mongo and i made a mistake of passing bad query to "remove" and it resulted in deletion of > 10 millions documents ![]()