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.

Added support for bulk update

See original GitHub issue

I want to update a specific fields in a subset of my database (a lot of items). I search a way to do the same behaviour than this code with bulk:

db.collectionName.find().forEach( function(doc) {
    let updateValue = ""

    if(doc.path == "/a/given/path/") {
        updateValue = "/some/other/path" + doc.path
    }

    db.collectionName.update({_id: doc._id}, {$set: {path: updateValue}});
});

Something like this: http://stackoverflow.com/questions/39693571/mongodb-update-a-string-field-in-all-documents

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
MudassarHakimcommented, Jan 10, 2018

Hi, Is there any update regarding the same

0reactions
marshallswaincommented, Jan 27, 2017

haha. So sorry, @popod! My brain automatically assumed I was looking at a FeathersJS/feathers-nedb issue. That’s what happens when you do rapid fire OS contributions, I guess.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create or update bulk records in Power Apps - Microsoft Learn
Updating or creating records in bulk allows you to act on many records at once. Here are some scenarios where you would want...
Read more >
How can I bulk update users? - Zendesk help
Answer There are three ways to bulk update users within Zendesk: Import ... Navigate to the Customers page in Support and use the...
Read more >
Practical details - how to use Bulk Update API
To use the Bulk Update API, a user must be assigned a role that contains the functional right Can bulk update, or allow-bulk-edit....
Read more >
Bulk Update for Existing Accounts using the Import Manager
Only certain fields are supported for update using the Import Manager. In addition to the fields below, account custom fields can be updated ......
Read more >
Tips & Tricks #15: How to Bulk-update Your Data in Zoho ...
For now, Zoho Subscriptions supports bulk-updates for credit notes with the upper limit being 25 credit notes per update. However, if you'd like...
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