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

Question about IDocumentReference data type #77

Open
akuteru opened this issue Apr 28, 2021 · 1 comment
Open

Question about IDocumentReference data type #77

akuteru opened this issue Apr 28, 2021 · 1 comment

Comments

@akuteru
Copy link

akuteru commented Apr 28, 2021

I would like to ask how this thing works?
Does this work like a join query in SQL?

Here is my scenario.

I have a Feed class which contains Title, Body, PostedBy

PostedBy is a DocumentReference type for my Users collections which contains user basic information (display name, birthdate and etc.)

What I want to achieve is upon calling the collection "Feed" I want it to also return the Name of the user on that same fetch. Is DocumentReference type the correct way to approach this? If so can someone enlighten me as to how to?

I just don't know how to work this out.

Can someone guide me or help me on this case? Will be much appreciated.

@f-miyu
Copy link
Owner

f-miyu commented Apr 29, 2021

Firestore doesn't support join query. You need to get each user document with the DocumentReference.

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