简体   繁体   中英

Firebase not fetching documents from collection for some collection

Trying to fetch the all documents present in Users Collections but receiving empty list and when i tried to fetch Documents from Admins collections its working fine.

    this._fs
      .collection(FBMainCollection.Users)
      .get()
      .subscribe((usr) => {
        const data = usr.docs.map((e) => e.data());
        console.log(data);
      });

Response []

empty list

Unable to fetch documents from a few collections.

working only for collections which doesn`t have nested collections;

用户集合中的文档

Your screenshot shows that you don't have any documents in the Users collection. Notice how all of the document IDs are in italics, and none of them have any fields. That means there is no document there, but there is a nested subcollection under it that you can navigate into. Queries do not read any of the nested subcollections, so instead it just shows and empty collection..

See also:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM