title: How to combine Firestore orderBy desc with startAfter cursor
body: <p>i am trying to query a list in firestore that should be sorted by a descending date property and make use of a startAfter cursor to paginate the results.</p>
  
  <p>As you can see in the snippets below, this is failing once i combine orderBy('date', 'desc') with startAfter(lastDoc.date). </p>
  
  <p>I am wondering what i am doing wrong. Any ideas?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// this actually works
  // but it is sorted by ascending dates
  db.collection('tanks')
    .doc(tankId)
    .collection('documentations')
    .orderBy('date')
    .startAfter(lastDoc.date)
    .limit(pageSize)
    .get()
    
  // this even works...
  // but has no cursor (startAfter) set for pagination
  db.collection('tanks')
    .doc(tankId)
    .collection('documentations')
    .orderBy('date', 'desc')
    .limit(pageSize)
    .get()
    
  // this is what i need
  // but it returns always zero results
  db.collection('tanks')
    .doc(tankId)
    .collection('documentations')
    .orderBy('date', 'desc')
    .startAfter(lastDoc.date)
    .limit(pageSize)
    .get()</code></pre>
  </div>
  </div>
  </p>