【发布时间】:2021-10-04 17:46:12
【问题描述】:
我正在使用批处理操作删除包含子集合的文档。
const myDocRef = firestore.collection("...").doc("...");
const myOtherDocRef = firestore.collection("...").doc("...");
const batch = firestore.batch();
batch.delete(myDocRef);
batch.delete(myOtherDocRef);
// TODO - Delete sub-collections ("likes", "comments")
batch.commit();
文档“myOtherDoc”是具有嵌套子集合的文档。如何使用批处理操作递归地删除它们?
我的意思是,不能为递归删除添加一些配置吗?
【问题讨论】:
标签: node.js firebase google-cloud-firestore