You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The grandpa_foo collection has many docs.
Each grandpa_foo collection has has only one daddy_foo doc with id "0"
Each daddy_foo collection has many baby_foo docs (array)
I am trying to make them a big nested family querying all over
The odd thing is...some queries will work, for these, daddy will log path (under baby_foo BaseFirestoreRepository): console.log('daddy',daddy); output:
Hi @brunodmn, looking at the issue I don't think such random value should be possible. SubCollection paths are assembled from the ids returned by a query.
In your second example, daddy's id should always be 0 since you're only fetching the document with the id 0 in const daddy = await grandpa.daddy_foo.findById("0")
To be able to properly debug this issue you need to provide a small project reproducing the bug since we cannot se the big picture with small files
I have a structure similar to this:
The grandpa_foo collection has many docs.
Each grandpa_foo collection has has only one daddy_foo doc with id "0"
Each daddy_foo collection has many baby_foo docs (array)
I am trying to make them a big nested family querying all over
The odd thing is...some queries will work, for these, daddy will log path (under baby_foo BaseFirestoreRepository):
console.log('daddy',daddy);
output:Another queries will not work, for these, daddy will log path (under baby_foo BaseFirestoreRepository):
console.log('daddy',daddy);
output:Noticed the 1 instead of 0 referencing a non existent document? Its random.
I tried
const daddy = await grandpa.daddy_foo.findOne()
instead ofconst daddy = await grandpa.daddy_foo.findById("0")
with same results.Querying with firestore would look like bellow, and work as expected:
I hope you understands the explanation...A I doing something wrong or its just some strange bug?
Thanks!
The text was updated successfully, but these errors were encountered: