What if we use UpdateDocumentAsync with empty mask?
See original GitHub issueUpdateDocumentAsync
api has required parameters document
and updateMask
The document just state that if any fields does not specified in the mask it would not be overridden. Which means if document already exist and we put an empty new DocumentMask()
it would not write any changed field existing isn’t it?
If it behave like this, what API should we call for override everything?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9
Top Results From Across the Web
Firestore v1 API - Class FirestoreClient (3.3.0) | .NET client ...
Mask = new DocumentMask(), Transaction = ByteString.Empty, }; ... If you require an atomically applied set of writes, use ...
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 Free
Top 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
As far as I can tell, this is not yet documented in the Protobuf definition. I created an internal PR to add this caveat.
The code path you’ve shown is when
SetOptions.Merge
is set to true.Otherwise, it uses an empty set of paths:
https://github.com/GoogleCloudPlatform/google-cloud-dotnet/blob/fac8204336424cb797aa120461f883cf9fdd5ac2/apis/Google.Cloud.Firestore/Google.Cloud.Firestore/WriteBatch.cs#L175-L187