How to query one field then order by another one in Firebase cloud Firestore?

前端 未结 6 971
粉色の甜心
粉色の甜心 2021-02-13 04:14

I\'m struggling to make a (not so) complex query in firebase cloud firestore.

I simply need to get all docs where the id field ==

6条回答
  •  别跟我提以往
    2021-02-13 04:38

    same here, it is weird why can't. below is another sample. can't get the result. Hoping firebase can reply about this and update the document.

    dbFireStore.collection('room').where('user_id.'+global.obj_user.user_id,'==',true).orderBy('last_update').get().then((qs)=>{
      console.log(qs);
    });
    

    using other work-around solution is javascript array and array.sort()

提交回复
热议问题