skip to Main Content

Firebase – Query using firestore collectionGroup but cant get data from root collection

I want to fetch learners enrolled in a specific subject. the collectionGroup works dbFire4 = Firebase.firestore dbFire4.collectionGroup("ClassEnrolled") .whereEqualTo("classID", classID) .get() .addOnSuccessListener { for (doc in documents) { val empData = doc.toObject(LearnerModel::class.java) learnerList.add(empData) } val mAdapter = LearnerAdapter(learnerList) recViewLearnerList.adapter = mAdapter…

VIEW QUESTION

Property 'default' does not exist on type 'typeof firebase'

I see typeOf error on default keyword. Here are my imports: import { AngularFirestore } from '@angular/fire/compat/firestore'; import { map } from 'rxjs/operators'; import firebase from 'firebase/compat/app'; import 'firebase/compat/firestore'; export class PostsService { constructor(private afs: AngularFirestore) { } countViews(postId: any){…

VIEW QUESTION

Firebase – How can I connect to a non-default firestore database using Node (using multiple firestore databases)?

I have multiple firestore databases in my project. The databases were created using the command line and I can see it in the Firestore Databases preview following the instructions here: https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project I am able to connect to the default database,…

VIEW QUESTION
Back To Top
Search