当我尝试通过此代码从firestore中的子集合中获取数据时 您遇到问题,并显示以下消息:
无效的文档参考。文档引用必须具有偶数个段,但是AppliedJobFromEmployees具有1
fun getData(onComplete: (MutableList<saveApplaiedEmployeeModel>) -> Unit): ListenerRegistration {
val id = FirebaseAuth.getInstance().currentUser!!.uid
val doc = FirebaseFirestore.getInstance().collection("AppliedJobFromEmployees/ $employerId/applicants/ $id/EmployeeApplicants")
return doc.addSnapshotListener { querySnapshot, _ ->
onComplete(querySnapshot!!.toObjects(saveApplaiedEmployeeModel::class.java))
}
}