title: Complex Meteor Publication Isn't Reactively Updating As Expected
body: <p>I'm working on a Meteor app that uses several Collections that reference each other in a tree-style organization. However, they're all represented as flat Collections in my database structure.  For example I have a top-level <code>Cars</code> Collection, a <code>Parts</code> Collection and a <code>Sellers</code> Collection that looks like this (pseudo-code):</p>
  
  <pre><code>Cars {
     _id:
     make:
     model:
     year:
     etc...
  }
  
  Parts {
     _id:
     carId: Cars._id
     type:
     desc:
     etc...
  }
  
  Seller {
     _id:
     partId: Parts._id
     location:
     name:
     etc...
  }
  </code></pre>
  
  <p>So the way they reference each other in the tree would look like this:</p>
  
  <pre><code>Car
   |
   ----&gt;  Part
   |       |
   |       ----&gt; Seller
   |       |
   |       ----&gt; Seller
   |       |
   |       ----&gt; Seller
   |
   ----&gt;  Part
           |
           ----&gt; Seller
           |
           ----&gt; Etc...
  </code></pre>
  
  <p>The problem I'm having is I use several top level publications where I pass the <code>Car._id</code> and want to see all the <code>Sellers</code> that sell <code>Parts</code> for that <code>Car</code>.  So in my route I have a Subscribe that looks like this:</p>
  
  <pre><code>waitOn: function() {
     return Meteor.subscribe('allSellersByCar', this.params._id);
  }
  </code></pre>
  
  <p>So to return all the <code>Sellers</code> from a <code>Car._id</code> I fetch all the <code>Parts</code> that match the <code>Car._id</code> and then use Underscore to <code>_.pluck()</code> the <code>Part._id</code> and find all the <code>Sellers</code> that match the array of <code>Part._id</code>:</p>
  
  <pre><code>Meteor.publish('allSellersByCar', function(carId) {
     var parts = Parts.find({carId: carId}).fetch();
     return Sellers.find({partId: {$in: _.pluck(parts, "_id")}});
  });
  </code></pre>
  
  <p>This method works fine and returns all the <code>Sellers</code> correctly.  The problem is this method will ONLY reatively return <code>Sellers</code> as they get added to EXISTING <code>Parts</code> and the Template will live update as expected, BUT it will not return any <code>Sellers</code> that get added to any NEW <code>Parts</code> that get added to the <code>Car</code> object.  So it seems it only reactively updates the last line of the query.  The entire query doesn't rerun when a new <code>Part</code> gets added.  But if you refresh the page (and hence the route), the query reruns and everything gets returned correctly.</p>
  
  <p>I have multiple publications like this in my app, some of which have several more "middle-man" fetches before returning. I'm not sure how to fix this or what the problem is.  Am I going about my pub/subs wrong?  Should I de-normalize the references more and add a <code>carId</code> to each <code>Seller</code> so I can just do the query directly on the <code>Seller</code> Collection in one line and not have to go through the <code>Parts</code> fetch?</p>