-
Notifications
You must be signed in to change notification settings - Fork 875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: Expose "create" precondition for firestore writes #1324
Comments
Using a transaction is the recommended approach for this scenario... Or you can configure your security rules to make sure the write fails if the document already exists (though it'll be a permission_denied error in this case). |
With #2436, you will no longer have to perform a dummy update if your document exists, since we no longer require that every document read must be written to. Adding |
It should be possibly to do a write that fails if the document already exists, like is possible in the admin sdk.
Instead I have to do something like:
The text was updated successfully, but these errors were encountered: