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.

Remove specific fields using `updateDocuments` - feature request/question

See original GitHub issue

In the regular Firestore JS API, you can do:

docRef.update({
    "field.subfield": firebase.firestore.FieldValue.delete()
});

to remove a specific field from a document.
Is there any way of doing that with this library as well? Or do I have to set the whole document to everything but that specific field (which of course costs more time as I have to do another API read call).

Other Comments

I also tried to update the field to null/undefined, but that does not work, it simply sets that field to null.

Library Version: 33

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:26 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
Yuvix25commented, Sep 19, 2022

Could you re-open my PR so that I would be able to add new commits to it?

0reactions
LaughDonorcommented, Sep 22, 2022

Closed with #143

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Remove a Field from a MongoDB Document ($unset)
In MongoDB, you can use the $unset field update operator to completely remove a field from a document. The $unset operator is designed ......
Read more >
How to delete a field in a Firestore Document? - Stack Overflow
I tried this change in the code, but still does not delete the field, I made a test and I can update the...
Read more >
Remove and RemoveIf functions in Power Apps
Use the Remove function to remove a specific record or records from a data source. For collections, the entire record must match.
Read more >
Remove unwanted fields from your data - Splunk Documentation
In this example, we'll use the Fields function to only keep selected fields in your records or remove specific fields from your records....
Read more >
Delete Documents — MongoDB Manual
MongoDB Manual: How to delete documents in MongoDB. How to remove documents in MongoDB. How to specify conditions for removing or deleting documents...
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