我将数据存储在Firebase存储中.
Comment具有属性的对象timestamp.当我将数据从设备推送到Firebase时,我timestamp使用currentTime 填充并存储在long数据类型中.
当我检索数据时,firebaseRef.orderByChild("timestamp").limitToLast(15)结果不是按照我的预期排序.
我甚至玩过规则而没有结果:
{
"rules": {
".read": true,
".write": true,
".indexOn": "streetrate",
"streetrate": {
".indexOn": ".value"
}
}
}
Run Code Online (Sandbox Code Playgroud)
我试图储存timestamp在String数据类型,同样的问题.