googlearchive / firebase-util

An experimental toolset for Firebase
http://firebase.github.io/firebase-util
MIT License
276 stars 67 forks source link

limitToFirst() query on NormalizedCollection does not restrict dataset #61

Open michaeldim opened 9 years ago

michaeldim commented 9 years ago

When applying a limitToFirst() query on the main ref of a NormalizedCollection, the returned data is not restricted by the limit value, http://plnkr.co/edit/WLAkVp?p=preview

Also applies to limitToLast() query

ginovva320 commented 9 years ago

The docs do say that querying the NormalizedRef will apply the query to the main ref. Any reason not to do that?

http://plnkr.co/edit/vmJRfxI1gmpgycTvjbwM?p=preview

katowulf commented 9 years ago

That should be a fine workaround.

michaeldim commented 9 years ago

Yep that works thanks.

katowulf commented 9 years ago

It's a good workaround, but should still correct this behavior.