Open danielzgtg opened 2 years ago
Hi @danielzgtg. Thank you for reporting this feature request. I'll talk with the team about it.
In the meantime, Have you considered using transactions to get this behavior? https://firebase.google.com/docs/reference/js/firestore_#runtransaction
I would like to create a document from the browser using behaviour similar to
O_CREAT | O_EXCL
. 8 other people are also looking for a clean way to do this. This functionality is present in the REST API, it's just not exposed to the JavaScript SDK.This differs from #1795 in that I'm not using any testing or admin SDK. They found a workaround. I also found a workaround, but I am creating this feature request because that workaround feels like a code smell.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
Relevant Code:
This problem is apparent at the documentation level, not the code level.