Can't combine startAt(), endAt()…
See original GitHub issueI’m trying to find the last couple of records (tracks from a playlist) using this code:
return this.store.find('track', {
orderBy: 'playlist',
equalTo: '-J_somefirebaseid'
});
… but I get the following error:
Error while processing route: channel.index.index Query: Can’t combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.
Error: Query: Can’t combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.
Doing playlist.get('tracks')
works, but I don’t want to load ALL those tracks. Only the last ten.
I’m on Ember 1.11.0, Ember Data 1.0.0-beta.16.1 and EmberFire 1.4.4.
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Error: Can't call startAt() or equalTo() multiple times
When I want to restrict the data I'm looking for with query to startAt () and endAt () , the application crashes and...
Read more >Can't combine startAt(), endAt()… · Issue #243 - GitHub
I'm trying to find the last couple of records (tracks from a playlist) using this code: return this.store.find('track', ...
Read more >Firebase Cloud Firestore Querying Filtering Data for Web
Learn how to Query, Filter, and Sort Document Data from Firebase Cloud Firestore Collection Using Vanilla JavaScript.
Read more >Retrieving Data | Firebase Realtime Database - Google
For example, you can combine the StartAt() and EndAt() methods to limit the results to a specified range of values. Even when there...
Read more >Work with Lists of Data | FlutterFire
Use the push() method to append data to a list in multiuser applications. ... For example, you can combine the startAt() and endAt()...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thats a good question. You could get the
hasMany
relationship array and then.filter
it on the client side.But, I know you’re really asking about doing it via server call. There isn’t a way that I know of off the top of my head.
Even if we got realtime updates via findQuery as requested in #235, this would still not allow
equalTo
+limitToX
…I wonder, for advanced situations if you could create a ref on the
hasMany
key for the model and when a child changes you can update the array manually… something like this (might need some adjustment):I’ve been finding the “filter it in the client” answer in different places, This is the most retarded answer ever. Download the whole database,and the filter it on the client , thank you very much>