Skip to main content

Posts

Featured

Creating nested documents in firestore

Firestore returning no records yet, I see them in consoleCollection not retuning any element.... ... 
You might facing issues written above. Then it might be this case.

You might getting empty response in this kind of query though there are elements in firestore.


db.collection(collection1).doc(doc1) .collection(collection2).doc(doc2) .collection(collection3).get() .then( function (querySnapshot) { querySnapshot.forEach(function (doc) { console.log(doc.id, " = ", doc.data()); } )
I face the same problem. Though data was stored sucessfully ( I was guessing, which was wrong actully ).  To verify that your data is not stored as you expceted you can do check this.

If key of your data is in italic font then your data is not stored or is marked as deleted [ that was happening in my case ]. See in image.


Now you might thinking, that I have created element and  not deleted it then why it's showing as deleted.

Truth is that if you want to create neste…

Latest posts

Upload Files to Firebase Storage with dropzone.js

Firebase - update a spacific fields of single element of object of array in firestore

mailgun forward incoming mail

Find count of day differance between two dates