question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow updating an entire document

See original GitHub issue

This 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:closed
  • Created 9 years ago
  • Reactions:2
  • Comments:18

github_iconTop GitHub Comments

4reactions
jbergenthal2commented, Nov 10, 2016

I had the same problem, see aldeed/meteor-collection2/issues/355 One workaround is to use not validate:false, but bypassCollection2:true

2reactions
derwaldgeistcommented, Oct 24, 2015

+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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found