-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.7, 2.2.0-rc2
-
Component/s: Tools
-
ALL
In MongoDB 2.0.7 it is possible to update() a document and set an invalid field name starting with $:
> db.test.insert({_id: "foo"}) > db.test.update({_id: "foo"}, {$set: {$set: "bar"}}) > db.test.find({_id: "foo"})
If you mongodump and then mongorestore this database, documents with invalid field names are silently ignored (even with `mongorestore -vvvvv`).
In MongoDB 2.2.0rc2 the attempt to update() does throw an exception:
Modified field name may not start with $
.. but mongorestore still does not report any errors for skipped documents.
- duplicates
-
SERVER-2611 mongorestore and mongoimport should getLastError after N inserts
- Closed