【发布时间】:2020-07-13 03:13:03
【问题描述】:
我正在尝试按字段名称订购 firestore 集合,但它给了我这个错误:AttributeError: 'CollectionReference' object has no attribute 'orderBy'。
我的代码:
participants_ref = db.collection("participants")
docs = participants_ref.orderBy("name").stream()
如果这有帮助,我还打印了参与者参考,我得到以下信息:
【问题讨论】:
标签: python firebase google-cloud-firestore