I have a problem retrieving data from Firebase. I am attaching the structure of my database in the figure.enter image description here Here I have the parent node as "Reply", inside that I have replykey, inside push key parent for each node have its children. I like to fetch data based on particular "teacherID" that matches the current teacher. The query I wrote is shown below
RootRef = FirebaseDatabase.getInstance().getReference();
query=RootRef.child("Reply").orderByChild("teacherID").equalTo(CurrentTeacherrId);
FirebaseRecyclerOptions<StudentModelClass> options =
new FirebaseRecyclerOptions.Builder<StudentModelClass>()
.setQuery(InstRef,StudentModelClass.class)
.build();
Using this code recycleView is not fetching the data. How I can rewrite the query to fetch data correctly
from Retrieving data in recycler view not working -query correction
No comments:
Post a Comment