Reputation: 54939
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?
Upvotes: 4
Views: 1320
Reputation: 7428
Yes, currently it would. Getting the number of children without downloading the entire object is currently not possible (though it may be a feature added in the future).
As a work-around, you may try storing the length in a separate location in Firebase (and update its value whenever children are added or removed).
Upvotes: 3