【问题标题】:How to save Document Reference from Cloud Function in Cloud Firestore?如何在 Cloud Firestore 中保存来自 Cloud Function 的文档参考?
【发布时间】:2018-03-19 07:24:43
【问题描述】:

Firestore 允许我将“参考”类型的字段添加到文档中。它是指向 Store 中其他文档的参考“链接”。

虽然我认为这非常方便,但我缺少有关它的文档。 例如,我在保存来自 Firebase Cloud Function 的引用时遇到了一些麻烦。 在客户端,我只是通过客户端 SDK 发送一个常规的“ref”对象,它保存了文档引用。在nodeJS(云函数)中,我得到一个错误,对象太深。

使用管理 SDK(和/或 JS 客户端 SDK)的类型引用保存字段的正确方法是什么?

【问题讨论】:

标签: firebase google-cloud-platform google-cloud-functions google-cloud-firestore


【解决方案1】:

Firebase 管理节点 SDK 已于今天更新并修复了此问题。 https://github.com/firebase/firebase-admin-node/releases/tag/v5.4.2

【讨论】:

    猜你喜欢
    • 2021-03-25
    • 2018-08-02
    • 1970-01-01
    • 1970-01-01
    • 2018-06-22
    • 2021-11-20
    • 2018-07-27
    • 2018-04-06
    • 1970-01-01
    相关资源
    最近更新 更多