-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: firestoreIssues related to the Firestore API.Issues related to the Firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.Resolving the issue is dependent on other work.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Paraphrased from @samtstern:
It's still possible to do
city_ref.update({
u'capital': True
}, firestore.CreateIfMissingOption(True))The other Firestore SDKs have removed this option and moved to an option on the set() operation called, merge(). For example, in the Android SDK:
db.collection("cities").document("BJ")
.set(data, SetOptions.merge());The new semantics make it so that the set() operation (and create() which some SDKs offer) is the only operation which can make a new document. The merge() option means that the data will be deep merged into any existing document, rather than just obliterating and replacing.
Metadata
Metadata
Assignees
Labels
api: firestoreIssues related to the Firestore API.Issues related to the Firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.Resolving the issue is dependent on other work.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.