Skip to content

Commit 4884bcb

Browse files
docs: improve documentation for merge behavior (#3257)
1 parent 173858b commit 4884bcb

File tree

1 file changed

+4
-2
lines changed
  • firebase-firestore/src/main/java/com/google/firebase/firestore

1 file changed

+4
-2
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/SetOptions.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public FieldMask getFieldMask() {
5959

6060
/**
6161
* Changes the behavior of {@code set()} calls to only replace the values specified in its data
62-
* argument. Fields omitted from the {@code set()} call will remain untouched.
62+
* argument. Fields omitted from the {@code set()} call will remain untouched. If your input sets
63+
* any field to an empty map, all nested fields are overwritten.
6364
*/
6465
@NonNull
6566
public static SetOptions merge() {
@@ -68,7 +69,8 @@ public static SetOptions merge() {
6869

6970
/**
7071
* Changes the behavior of {@code set()} calls to only replace the given fields. Any field that is
71-
* not specified in {@code fields} is ignored and remains untouched.
72+
* not specified in {@code fields} is ignored and remains untouched. If your input sets any field
73+
* to an empty map, all nested fields are overwritten.
7274
*
7375
* <p>It is an error to pass a {@code SetOptions} object to a {@code set()} call that is missing a
7476
* value for any of the fields specified here.

0 commit comments

Comments
 (0)