Allow updating an entire document
See original GitHub issueThis is linked to issue #82. The MongoDB documentation indicates that it is possible to replace all fields of a document at once: http://docs.mongodb.org/manual/reference/method/db.collection.update/#example-update-replace-fields
However, when I do a MyColl.update({id: docId}, {field1: val1, field2, val2})
, the update fails with the error:
Error: When the modifier option is true, all validation object keys must be operators. Did you forget $set
?
Is that intended or am I doing something wrong?
Issue Analytics
- State:
- Created 9 years ago
- Reactions:2
- Comments:18
Top Results From Across the Web
How to update/refresh one field or all fields in Word document?
To update one field, there is a utility in right click menu. Select the field you want to update, right click to display...
Read more >How to Update Fields in Microsoft Word (One or All Fields)
Updating all fields in the body of a Word document · Click in the body of the Word document. · Press Ctrl +...
Read more >Working with Fields and Forms in Word 2016 - InformIT
To update all the fields in the entire document, select the entire document (Ctrl+A) and press F9. If the update takes too long, ......
Read more >Updating Fields Automatically - Word Ribbon Tips
Updating Fields Automatically · Display the Word Options dialog box. · At the left of the dialog box click Display. · Make sure...
Read more >How to add or update a table of contents in Microsoft Word.
Right-click the table of contents and select Update Field in the pop-up menu. In the Update Table of Contents window, select the Update...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same problem, see aldeed/meteor-collection2/issues/355 One workaround is to use not
validate:false
, butbypassCollection2:true
+1 for adding this.
According to Meteor docs, an upsert modifier may contain a whole document: http://docs.meteor.com/#/full/modifiers
It would be really nice if SimpleSchema would support this, since it is quite errorprone to create a $set for all of the document’s values.