This is how my Database looks like.
The table group has child "currentMembers"
In "currentMember", the first string is userID, and the next one is a boolean. I want to select group which contain a specific userID. My code is showing below.
Query query = FirebaseDatabase.getInstance()
.getReference()
.child("groups").orderByChild("currentMembers").equalTo(currentUserID);
FirebaseRecyclerOptions<UserGroup> options =
new FirebaseRecyclerOptions.Builder<UserGroup>()
.setQuery(query, UserGroup.class)
.build();
But it return nothing, how could I fix it?