簡體   English   中英

如何更新Sub collection Firestore?

[英]How to update Sub collection Firestore?

我想更新子集合的所有文檔。 例如:Sensor / userId / Data我想更新所有成員。 可能嗎?

您的問題有很多待解釋,但是在JavaScript中,您可以通過這種方式設置(或更新)子集合...

firestore.collection(`Sensor`).doc(userid).collection('members').doc(memberId).set(data)

在此處查看更多-https: //firebase.google.com/docs/firestore/data-model

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM