0
Get Document ID by Having the Data of Fields - Firebase
Hello, How can I get a document ID by having field data of the same document (Firebase Firestore)? collection/document_id/field I have the field data and want to get the document_id. Btw, I use Java in Android Studio.
3 Réponses
0
Tibor Santa that's not what I'm looking for, I need to get the document ID by knowing the fields. What you send is the opposite: by knowing the document ID, get the fields.
0
In that case you will need to write a query. An attribute may not be able to uniquely identify a single element from your collection, so a query like that may yield multiple results.
https://firebase.google.com/docs/firestore/query-data/queries#java