My current project is using firebase. I am currently working on retrieving documents from firebase, but I have encountered a specific issue. The problem lies in the fact that I have older documents without a "hidden" field and newer documents with this field included. My objective is to retrieve each document where the "hidden" field is set to false, and here is my attempt:
getUserDocuments(): Observable<DocumentInterface[]> {
return this.db
.collection<DocumentInterface>(CollectionNames.DOCUMENTS, (ref) =>
ref.where('uid', '==', this.uid).orderBy('timeCreated', 'desc').where('hidden', '==', 'false')
)
.valueChanges();
}
I have thoroughly reviewed the documentation but I cannot figure out why I am getting an empty array as a result. Any guidance or assistance on this matter would be greatly appreciated!