4

Is there a way to get the number of children of an object without downloading the entire object? From what I understand using numChildren would first download the entire object, would it not?

4

1 回答 1

3

是的,目前会。当前无法在不下载整个对象的情况下获取子对象的数量(尽管它可能是将来添加的功能)。

作为一种解决方法,您可以尝试将长度存储在 Firebase 中的单独位置(并在添加或删除子项时更新其值)。

于 2013-06-29T18:54:11.877 回答