When i add a document with my own document Id (not auto generated), document Id node is in italics as shown in the screenshot from Firestore console. What is the reason behind this?
My code to add data is
const billingRef = db
.collection('billing/test/2017/months/11')
.doc();
billingRef
.set({ name: 'ABC' })
.then(_ => {
console.log('saved');
})
.catch(err => {
console.log(err);
});
Above code adds a node successfully, but adds node "test" and "months" in italics.
screenshot 1
screenshot 2 screenshot 3
My query yields zero results for such records in firestore, following code. How can I query all the nodes under billing?
db.collection("billing").get().then(function(querySnapshot) {
console.log(querySnapshot.size) // this is always 0
querySnapshot.forEach(function(doc) {
console.log(doc.id, " => ", doc.data());
});
});