This is the structure of my database.
Restaurant Adapter
DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference().child("Restaurant");
DatabaseReference infoRef = rootRef.child("Info");
DatabaseReference categoryRef = rootRef.child("Category");
FirebaseRecyclerOptions <RestaurantDetails> options = new FirebaseRecyclerOptions.Builder<RestaurantDetails>()
.setIndexedQuery(infoRef, categoryRef, RestaurantDetails.class)
.build();
adapter = new RestaurantAdapter(options);
recyclerView.setAdapter(adapter);
I am using this format from this link on the structured data. When I did a quick test, the page shows empty. Also, I like to ask if I want to join another table called "Location" as can see from image. Would like to know how cause I believe I only can join 2?
https://firebase.google.com/docs/database/admin/structure-data
UPDATED Am I on the right track? It didn't work and I got another new error which is this:
com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.Boolean to type com.isaac.foodie.RestaurantDetails
AND THIS
2020-04-05 21:19:59.149 3490-3490/com.isaac.foodie E/AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6594)