title: Extending Mongo.Collection breaks find() method
body: <p>Following the excellent <a href="http://guide.meteor.com/collections.html#schema-design" rel="nofollow">Meteor Guide</a> I have tried to play with extending a collection. My ultimate aim is to create objects that manage insertion and update immediately as their values are updated. I've tried this with my <code>Order</code> class: </p>
  
  <pre><code>Order = class Order {
    constructor(customerId, orderDate){
      this.document = {};
      this.document.customerId = customerId;
      this.document.orderDate = orderDate;
      this.document._id = Orders.insert(this.document);
    }
  
    // some class methods go here.
  }
  </code></pre>
  
  <p>My <code>orders</code> are uniquely defined by the customer id and date. So you cannot make two orders on the same day. Therefore I've extended the <code>Mongo.Collection</code> class with my own <code>OrderCollection</code> class. This sort of abstracts the data layer to ensure the data therein remains remains unique to it's key: </p>
  
  <pre><code>class OrderCollection extends Mongo.Collection{
  
    constructor(collectionName){
      super(collectionName);
      this.attachSchema(
        new SimpleSchema({
          customerId: { type: String }, 
          orderDate: { type: Date }
        })
      );  
    }
  
    insert(list, callback){
      // check if the actual order already exists
      if (list._id){
        return _id;
      }
  
      // we won't insert a new order if a matching one exists. 
      var order = Orders.findOne({
        customerId: list.customerId,
        orderDate: list.orderDate
      });
      if (order){return order._id;}
  
      // create order and return it. 
      return super.insert(list, callback);
    }
  
    remove(selector, callback){
      return super.remove(selector, callback);
    }
  }
  
  Orders = new OrderCollection("orders");
  </code></pre>
  
  <p>This all seems to work. When I create a new order it's either creating a new one, or it returns the existing one with the correct _id. So for example when I run <code>meteor reset</code> and then enter a new Order I retrieve the same <code>_id</code> as I do when I stop meteor, restart it and try the same insert again:</p>
  
  <pre><code>{ document:                                                                                                                                                                                                    
    { customerId: 'QB6rEEJirGXS3oj6R',                                                                                                                                                                          
      orderDate: Fri Jan 29 2016 00:00:00 GMT+0000 (GMT),                                                                                                                                                       
      _id: 'AwmygYsPnxR86Ks6D' } }
  </code></pre>
  
  <p>This is all well and behaving as expected. But I just cannot seem to retrieve any objects through subscriptions or calls to <code>Orders.find({}).fetch()</code> either on the client.   </p>
  
  <p>Even msavin:mongol tells me that the Orders collection is empty and even if I add new items to it through the monogl interface, they don't appear. What am I doing wrong?</p>
  
  <p><em>Update</em></p>
  
  <p>I'm using SimpleSchema and Collections2 and wonder if they somehow may not support the way I use this. </p>