Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subcollection syncing with different parent collections getting mixed up #207

Open
davidoort opened this issue Apr 21, 2024 · 2 comments
Open

Comments

@davidoort
Copy link

I have a subcollection for two parent collections:
chats/{chatId}/messages
flick/{flickId}/messages

When I create a new extension and provide this path: flick/{flickId}/messages, documents from the chats parent collection also show up. This is not how I expected it to work.

@smomin
Copy link
Collaborator

smomin commented Apr 26, 2024

hey @davidoort

I assume this happens during full indexing. If so, this is a limitation in the Firebase api. I have to use the collectionGroup api and I parse the collection path to get the last part which in your case is messages. This then gets all the messages collection. I will check with the Firebase team again to see if they have a better approach now.

Sajid

@davidoort
Copy link
Author

ah I see, yeah that would be great. Otherwise you'll have to iterate over all documents in the parent collection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants