File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed
Firestore/Source/Public/FirebaseFirestore Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ NS_SWIFT_NAME(DocumentReference)
90
90
*
91
91
* @param documentData An `NSDictionary` that contains the fields and data to write to the
92
92
* document.
93
- * @param merge Whether to merge the provided data into any existing document.
93
+ * @param merge Whether to merge the provided data into any existing document. If enabled,
94
+ * all omitted fields remain untouched. If your input sets any field to an empty dictionary, any
95
+ * nested field at this location is overwritten.
94
96
*/
95
97
- (void )setData:(NSDictionary <NSString *, id > *)documentData merge:(BOOL )merge;
96
98
@@ -106,8 +108,9 @@ NS_SWIFT_NAME(DocumentReference)
106
108
* @param documentData An `NSDictionary` containing the fields that make up the document
107
109
* to be written.
108
110
* @param mergeFields An `NSArray` that contains a list of `NSString` or `FIRFieldPath` elements
109
- * specifying which fields to merge. Fields can contain dots to reference nested fields within
110
- * the document.
111
+ * specifying which fields to merge. Fields can contain dots to reference nested fields within
112
+ * the document. If your input sets any field to an empty dictionary, any nested field at this
113
+ * location is overwritten.
111
114
*/
112
115
- (void )setData:(NSDictionary <NSString *, id > *)documentData mergeFields:(NSArray <id > *)mergeFields;
113
116
Original file line number Diff line number Diff line change @@ -54,7 +54,9 @@ NS_SWIFT_NAME(Transaction)
54
54
*
55
55
* @param data An `NSDictionary` that contains the fields and data to write to the document.
56
56
* @param document A reference to the document whose data should be overwritten.
57
- * @param merge Whether to merge the provided data into any existing document.
57
+ * @param merge Whether to merge the provided data into any existing document. If enabled,
58
+ * all omitted fields remain untouched. If your input sets any field to an empty dictionary, any
59
+ * nested field at this location is overwritten.
58
60
* @return This `FIRTransaction` instance. Used for chaining method calls.
59
61
*/
60
62
// clang-format off
@@ -77,8 +79,9 @@ NS_SWIFT_NAME(Transaction)
77
79
* to be written.
78
80
* @param document A reference to the document whose data should be overwritten.
79
81
* @param mergeFields An `NSArray` that contains a list of `NSString` or `FIRFieldPath` elements
80
- * specifying which fields to merge. Fields can contain dots to reference nested fields within
81
- * the document.
82
+ * specifying which fields to merge. Fields can contain dots to reference nested fields within
83
+ * the document. If your input sets any field to an empty dictionary, any nested field at this
84
+ * llocation is overwritten.
82
85
* @return This `FIRTransaction` instance. Used for chaining method calls.
83
86
*/
84
87
// clang-format off
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ NS_SWIFT_NAME(WriteBatch)
57
57
*
58
58
* @param data An `NSDictionary` that contains the fields and data to write to the document.
59
59
* @param document A reference to the document whose data should be overwritten.
60
- * @param merge Whether to merge the provided data into any existing document.
60
+ * @param merge Whether to merge the provided data into any existing document. If enabled,
61
+ * all omitted fields remain untouched. If your input sets any field to an empty dictionary, any
62
+ * nested field at this location is overwritten.
61
63
* @return This `FIRWriteBatch` instance. Used for chaining method calls.
62
64
*/
63
65
// clang-format off
@@ -79,8 +81,9 @@ NS_SWIFT_NAME(WriteBatch)
79
81
* @param data An `NSDictionary` that contains the fields and data to write to the document.
80
82
* @param document A reference to the document whose data should be overwritten.
81
83
* @param mergeFields An `NSArray` that contains a list of `NSString` or `FIRFieldPath` elements
82
- * specifying which fields to merge. Fields can contain dots to reference nested fields within
83
- * the document.
84
+ * specifying which fields to merge. Fields can contain dots to reference nested fields within
85
+ * the document. If your input sets any field to an empty dictionary, any nested field at this
86
+ * location is overwritten.
84
87
* @return This `FIRWriteBatch` instance. Used for chaining method calls.
85
88
*/
86
89
// clang-format off
You can’t perform that action at this time.
0 commit comments