Specify Id of document in RXFirestore
See original GitHub issueIs it possible to specify the id of the documents we create via RXFirestore.addDocument()
? I find this very useful feature missing. Could someone help show how to do it?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to add Document with Custom ID to firestore
To use a custom ID you need to use .set , rather than .add. This creates a document with the ID "LA":
Read more >Add data to Cloud Firestore - Firebase - Google
There are several ways to write data to Cloud Firestore: Set the data of a document within a collection, explicitly specifying a document...
Read more >Add a Firestore document using an autogenerated id
// Add a new document with a generated id. puts "Added document with ID: #{added_doc_ref.
Read more >Firebase V9 Firestore Add Document Data – addDoc()
1. Initialize Firestore Database · 2. Collection() Method · 3. Document Data {} · 4. Add Document Data Using addDoc() · 5 Get...
Read more >JavaScript : How to add Document with Custom ID to firestore
JavaScript : How to add Document with Custom ID to firestore [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] JavaScript : How ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks ! But not. But I found ! After hours of struggling. I forked the repo and found in javadoc
setDocument
thatWonderful. Here is the result.
I can now create users documents named with the authentication user ID, so no need to use queries, everything is very simple.
Thanks again for your help
AddDocument recieve a Document or CollectionReference. You just need to create the ID before and add it to your new reference before call
AddDocument