"usersPost": {
"post4543": {
"userID": "X12",
"text": "Hi"
},
"post4544": {
"userID": "X12",
"text": "HELLO"
},
"post454S4": {
"userID": "X143",
"text": "....."
}
}
EqualTo I want to retrieve only posts of some user , let's say "userID": "X12"
EndAt,LimitToLast there is no point to download all snapshot (I have 1M posts), so I limit my downloads to 5 results only.And start from the last saved key
Therefore my code is
OrderByChild("userID").EndAt(lastSavedKey).EqualTo("X12").LimitToLast(5);
//lastSavedKey is the post key "post4544"
That works on Windows, but doesn't work on Android, as I receive:
Error firebase Query::EqualTo: Cannot combine equalTo() with endAt()
I read some posts about issues of combining multiple queries. But what's the alternative solution for my case? Why does it work on Windows? There is no error on Windows! It works perfectly and EndAt the last saved key. (I use Unity Editor)