-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.1.1
-
Component/s: None
-
None
-
Environment:Linux
remove({_id: {$lt: some_value}}) only removes one element, but remove({other_field: {$lt: some_value}}) removes all matching elements:
> db.testme.save({_id:1, _o:1})
> db.testme.save({_id:2, _o:2})
> db.testme.save({_id:3, _o:3})
> db.testme.save({_id:4, _o:4})
> db.testme.save({_id:5, _o:5})
> db.testme.remove({_id: {$lt: 4}})
> db.testme.find()
> db.testme.remove({_o: {$lt: 4}})
> db.testme.find()