<分区>
我正在尝试运行以下查询:
this.db.firestore
.collectionGroup('members')
.orderBy('dateModified', 'desc')
.where(firebase.firestore.FieldPath.documentId(), '==', uid)
但是我得到了错误:
Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but 'X6yL5Ko55jSMWhhoQUO91xVYdEH3' is not because it has an odd number of segments (1).
将文档 ID 添加到文档中是解决此问题的唯一方法吗? 这并不理想,因为我有很多现有数据...... 文档 id 是 firebase 用户的 uid。