What is the difference between
FirebaseDatabase.getInstance().getReference()
.child("Users")
.child("Accounts")
.child("AC123");
and
FirebaseDatabase.getInstance().getReference()
.child("Users")
.child("Accounts")
.orderByKey()
.equalTo("AC123");
using addListenerForSingleValueEvent seems to return the same DataSnapshot in that the toString() values are the same and using DataSnapshot.getValue() seems to return identical HashMaps but only the first reference reports that it "has children".
Trying to query for children in the second reference just throws a NPE.
{
"Users" : {
"Accounts" : {
"AC123" : {
"linked" : true,
"sort" : 0,
"type" : 1
}
},
etc