问题
For example the document contains the following structure:
{
fieldA: number,
fieldB: {
subFieldA: string,
subFieldB: string,
}
}
... and is being listened with the onSnapshot method.
FirebaseDb
.collection(`someCollection`).doc('documentAbove')
.onSnapshot({ includeMetadataChanges: true }, (snapshot) => {
// when the document being modified it becomes available at this stage
})
My question is if when the document will be modified will the firestore download it once again?
回答1:
Yes, the document will be downloaded again in its entirety while that listener is active, and you will be charged for a read on that document for each change.
来源:https://stackoverflow.com/questions/60315286/does-updating-one-field-will-download-the-whole-document-from-the-database-or-ju