From Firebase docs, we get that:
Batched writes
If you do not need to read any documents in your operation set, you can execute multiple write operations as a single batch that contains any combination of set(), update(), or delete() operations. A batch of writes completes atomically and can write to multiple documents.
But in my case, I need to be sure that an add()
operation (creating a new document) will happen together with a set()
operation to update some other pre-existing document.
Is there a way to do this?
Note: I'm using the Javascrip SDK.