title: Querying by a field with type 'reference' in Firestore
body: <p>I have a collection called 'categories' containing a single document with ID: 5gF5FqRPvdroRF8isOwd.</p>
  
  <p>I have another collection called 'tickets'. Each ticket has a reference field which assigns the ticket to a particular category.</p>
  
  <p>The field in the tickets collection is called 'category' and has a field type of <code>reference</code>.</p>
  
  <p>In the code below, <code>categoryDocId</code> is the document ID of the category I want to query by.</p>
  
  <pre><code>const categoryDocID = `5gF5FqRPvdroRF8isOwd`;
  
  const files = await firebase
    .firestore()
    .collection('tickets')
    .where('category', '==', categoryDocID)
    .get();
  </code></pre>
  
  <p>Why does <code>files.length</code> return 0?</p>
  
  <p>For testing, I changed the <code>category</code> field type to string, and set it to the category ID instead of a direct reference. This correctly returned tickets assigned to the category, which leads me to believe it's something about how I'm querying a <code>reference</code> field.</p>