This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 441
Firestore nested collections #559
Comments
no one? |
Accidentally closed |
Looks like a bug, thanks for reporting it! |
I think I found the problem, in firebase.android.ts you are creating a collection from the root db instance everytime. If I don´t chain the collection.doc.collection calls instead get the collection with a deeplink (users/${user.uid}/worktimes) it works. We need to find a way to determan if the collection is a chained one or the root one. If chained generate the path relative to the document otherwise generate the path from the root db. |
EddyVerbruggen
added a commit
that referenced
this issue
Dec 7, 2017
Found a way to make it behave properly! With 5.0.3 you will be able to do for instance: const streetsCollectionRef: firestore.DocumentReference = firebase.firestore()
.collection("cities")
.doc("SF")
.collection("streets"); or even deeper: const docRef: firestore.DocumentReference = firebase.firestore()
.collection("cities")
.doc("SF")
.collection("streets")
.doc("QZNrg22tkN8W71YC3qCb"); // id of some doc in the 'streets' collection |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
hello eddy,
first of all thx for this amazing plugin!
I am trying to use the new firestore feature. The firebase docs are saying that yon can nest a collection under a document ref. Using your plugin the nesting doesn´t work. The collection is always being created under the root of the database.
Here my example code
I´m expecting the worktimes data under the user document but in the firebase console there is a collection "worktimes" at the root level.
The data comes from an api call. Any ideas?
Thx Armin
The text was updated successfully, but these errors were encountered: