I am trying to do a nested query for one of my tables, but it ends up returning all the values in the table where date
is bigger instead of returning all the values in the table where userId = userId
and date
is bigger
DatabaseReference tableAttendObject = getDatabaseTableWith(Constants.tableAttendObject);
Query query = tableAttendObject.orderByChild(Constants.AttendObjectUserUUID).equalTo(userId);
query = query.getRef().orderByChild(Constants.AttendObjectEventDate).startAt(date);
query.addValueEventListener(new ValueEventListener() {
//return logic
My data model in the table is like this:
->id->userId
->date