In Firebase I wanted to ask about usage for the setPersistenceEnabled(true)
.
When I was running tests involving removing entries like this:
"ADDRESS_ID" : {
"US(fss)district of columbia(fss)washington(fss)pennsylvania ave se(fss)1600" : {
"-KZhVUg43lazrLQbIuLJ" : "true"
},
"US(fss)district of columbia(fss)washington(fss)pennsylvania ave se(fss)1601" : {
"-KZs0G5-FP3QW3MeoWre" : "true"
},
}
Just to see what my Firebase Query
would return. When I removed one of the above like the: ..se(fss)1601
Then my search query looking like this still return both
keys in the above code.
Query query = databaseRef
.child("TOYS
.concat("/"
.concat("ADDRESS_ID")
.concat("/"))
.orderByKey()
.startAt(US(fss)district of columbia(fss)washington(fss)pennsylvania ave se(fss));
query.addListenerForSingleValueEvent(singleShotListener);
I waited ten minutes and run the above Query
again and the dataSnapshot.getChildrenCount()
was =2 and I see that both keys is the above.
When I after half en hour clear app cache and data on my target device Galaxy Note 4 and of course deleted the SQLite database used by Firebase Database?, then my Query
only return the "existing" key ..nw(fss)1600
I suppose this could be expected behavior or?