Difference between set with {merge: true} and update
Asked 07 September, 2021
Viewed 1.3K times
  • 52
Votes

In Cloud Firestore there are three write operations:

1) add

2) set

3) update

In the docs it says that using set(object, {merge: true}) will merge object with existing one.

The same happens when you use update(object) So what is the difference if any? It seems strange that google will duplicate logic.

5 Answer