【发布时间】:2021-08-27 11:04:59
【问题描述】:
我正在尝试搜索集合 a 中的所有文档,并引用集合 b 中的特定文档。
我在这里或在谷歌上找到的所有东西都不起作用:/
我在服务类中的尝试
getAsFromB(id) {
var refB = this.firestore.collection("/collection_b").doc(id);
console.log(refB);
return this.firestore
.collection("/collection_a", (ref) => ref.where("refB", "==", refB))
.snapshotChanges();
}
我得到的只是以下错误:不支持的字段值:refB = custom Object 但日志说 refB 看起来不错 AngularFirestoreDocument
我忘记了什么或者我做错了什么?
提前多谢
【问题讨论】:
标签: angular typescript google-cloud-firestore