1
在JavaScript中,我写了这样的东西,但它返回错误>“文档引用必须有偶数段”。我需要使用“设置”而不是“添加”我的情况。如何在Firebase的Cloud Firestore中添加这样的数据?
const ref= db.collection("product");
ref.doc("111").doc("category").set({ clothes: true });
在Firebase的实时数据库中,我可以编写这样的代码,但在Firestore中我不能。
ref.child("111").child("category").set({ clothes: true });
如何在Firestore中编写这样的代码?
谢谢。