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

feat(android): change getDocuments return value #6

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Aug 4, 2023

The current getDocuments call will just return a list of the data values but not the ID of the actual document.

[
{  image: '',    name: 'Name1'  },
{  name: 'Nam2'  },
{  name: 'Name3'  }
]

This PR adds the ID as _id:

 [
  { name: 'Name1', image: '', _id: '8zNNaaaCXyeHY5ETaaa' },
  { name: 'Name2', _id: 'NR6NSOOYaaaH4aaaaL' },
  { name: 'Name3', _id: 'SbQoWJ4h8aaauM1aaadS' }
 ]

I've used _id so it won't clash if you defined an id node yourself. I have a previous commit where I've change the structure to id: "...", data: {} but that would break existing apps.

firebase.firestore-android-2.0.0.zip

@hansemannn hansemannn merged commit 36178e8 into hansemannn:main Aug 4, 2023
@m1ga m1ga deleted the fixes branch August 4, 2023 12:14
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

Successfully merging this pull request may close these issues.

2 participants