【发布时间】:2020-08-19 20:11:44
【问题描述】:
我注意到 Firestore iOS SDK(可能还有许多其他平台)无权访问文档的 createTime 属性。
使用 node.js,我可以访问 DocumentSnapshot 的 createTime 属性(在他们的 official document for node.js 中也没有提到)。
我的问题是,为什么 firebase 不让我们使用这个属性(或默默地让我们使用它),即使它在很多情况下都非常有用并且已经存在?
还有什么方法可以在 iOS 上使用这个属性?现在我必须手动保留与每个文档关联的额外字段(这听起来很愚蠢,因为知道 firestore 已经保留了一个属性)。
来自代码注释:
/**
* The time the document was created. Not set for documents that don't
* exist.
*/
readonly createTime?: Timestamp;
【问题讨论】:
标签: ios node.js firebase google-cloud-firestore