dalenguyen / firestore-backup-restore

NPM package for backup and restore Firebase Firestore

Home Page:https://firebaseopensource.com/projects/dalenguyen/firestore-backup-restore/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to get subCollection data if setting queryCollection in export options

leoleelf opened this issue · comments

If we customize queryCollection in export options to get partial data in the collection and there are sub-collection data in the documents, the sub-collection data will not be included in the exported file.

Environment

Steps to reproduce

Expected result

{
  "test": {
    "00cbe770-5632-11ed-aa38-1f8d2f865f55": {
      "name": "Dale Nguyen",
      "email": "dale@dalenguyen.me",
      "subCollection": {
        "test/00cbe770-5632-11ed-aa38-1f8d2f865f55/details": {
          "01966360-5632-11ed-aa38-1f8d2f865f55": {
            "dogId": "2",
            "dogName": "hello"
          },
          "01d36c60-5632-11ed-aa38-1f8d2f865f55": {
            "dogName": "lala",
            "dogId": "2"
          }
        }
      }
    }
  }
}

Actual result

{
  "test": {
    "00cbe770-5632-11ed-aa38-1f8d2f865f55": {
      "email": "dale@dalenguyen.me",
      "name": "Dale Nguyen",
      "subCollection": {
        "test/00cbe770-5632-11ed-aa38-1f8d2f865f55/details": {}
      }
    }
  }
}

Fixed in v1.3.5