Currently, deleting fields from a Document is not possible when using schemas. Without schemas it is possible by using firebase.firestore.FieldValue.delete() in the Document.update/set functions, although this is a bit of a cumbersome API.
Proposal API that treats undefined as a special value to delete a field.
doc.update({
status: undefined // this will delete the field status
});
Additional requirements/info:
undefined is syntactic sugar for firebase.firestore.FieldValue.delete()
null, sets the value of the field to null in firestore
undefined can be used with schemas
firebase.firestore.FieldValue.delete() should also be supported (however not work with schemas)
Currently, deleting fields from a Document is not possible when using schemas. Without schemas it is possible by using
firebase.firestore.FieldValue.delete()
in theDocument.update/set
functions, although this is a bit of a cumbersome API.Proposal API that treats
undefined
as a special value to delete a field.Additional requirements/info:
undefined
is syntactic sugar forfirebase.firestore.FieldValue.delete()
null
, sets the value of the field tonull
in firestoreundefined
can be used with schemasfirebase.firestore.FieldValue.delete()
should also be supported (however not work with schemas)