When should I use update()
over set()
? With set()
and merge : true
, I can do exact the same thing as update()
and it is guaranteed it will not fail, while update()
will fail if the document does not exist.
Asked
Active
Viewed 826 times
1

J. Doe
- 12,159
- 9
- 60
- 114
-
You question have already been answered in this topic: https://stackoverflow.com/a/46600599/7674708 – Frederiko Ribeiro Feb 01 '18 at 00:30