title: Firebase querying when combining orderByChild startAt and limitToFirst
body: <p>I'm trying to set up a firebase query that will implement pagination for me. Similar to this: <a href="https://www.firebase.com/blog/2013-10-01-queries-part-one.html#paginate" rel="nofollow">https://www.firebase.com/blog/2013-10-01-queries-part-one.html#paginate</a></p>
  
  <p>My problem is when I try to combine the three methods mentioned above. For example, one of my ref's looks like this: <code>userRef = ref.child('Users').orderByChild('email').startAt(null, end.id).limitToFirst(Number(limit))</code></p>
  
  <p>So I have my Users list. I want it ordered alphabetically by email. I want this new query to start at the last entry of the old query. Lastly I want to limit the amount of children returned to a number like 4.</p>
  
  <p>Now when I combine just two of these methods such as startAt and limitToFirst in other lists, the query works as expected. Unfortunately this depends on the list being presorted in firebase already. What happens with this user query is that firebase just returns the first limit number of children always. It's basically ignoring the startAt part. I've even tried hardcoding in keys to this and it just goes ignored.</p>
  
  <p>I know that you can tell firebase to sort your entries by using indexOn rules and if I have to reconstruct my database I will as a last resort (I implemented the indexOn after I made some users). But I feel like this should be able to work without indexOn, I don't see why it shouldn't.</p>
  
  <p>My data structure is going to look like: </p>
  
  <pre><code>Root:{ 
    Users:{
      01d1d38d-c780-4c5e-8537-a74432dea86e:{
        email:example@gmail.com, 
        questions: {}, 
        comments: {} 
      } 
    }
  </code></pre>
  
  <p>Is there a way of accomplishing this query properly? Is there a reason why I can't construct a query this way?</p>