title: TypeError: Model.findById is not a function (Rare error)
body: <p>This happend so rarely, but it's stressing.</p>
  
  <p>I got this Schema and Model:</p>
  
  <pre><code>//Product Schema
  let ProductSchema = new Schema({
    name: {
      type: String,
      required: true
    },
    description: {
      type: String
    },
    price: {
      type: Number,
      required: true
    },
    inStock: {
      type: Number,
      required: true
    },
    barCode: {
      type: String,
      required: true,
      index: true,
      unique: true
    }
  }, {
    timestamps: {
      createdAt: 'created_at',
      updatedAt: 'updated_at'
    }
  });
  </code></pre>
  
  <p>and export like this:
  <code>module.exports = v1_connection.model('Product', ProductSchema);</code></p>
  
  <p>So, in the same folder but another file, I got this two Schema (The first is embedded in the second):</p>
  
  <pre><code>/*
    Product in Sale Schema
  */
  let InSaleProductSchema = new Schema({
    product: {
      type: Schema.ObjectId,
      ref: 'Product',
      unique: true
    },
    qty: {
      type: Number,
    },
    total: {
      type: Number,
    },
    inSale: {
      type: Boolean
    }
  }, {
    timestamps: {
      createdAt: 'created_at',
      updatedAt: 'updated_at'
    }
  });
  
  /*
    Sale Schema
  */
  let SaleSchema = new Schema({
    user: {
      type: Schema.ObjectId,
      ref: 'User'
    },
    products: [InSaleProductSchema],
    total: {
      type: Number,
    },
    isComplete: {
      type: Boolean,
      default: false
    }
  }, {
    timestamps: {
      createdAt: 'created_at',
      updatedAt: 'updated_at'
    }
  });
  </code></pre>
  
  <p>Well, the problem it's specified in a pre 'save' hook, who want's to substract the needed quantity from the product saved document. In this line it's the problem</p>
  
  <pre><code>// Create and execute the query to find the product by de product ID
  let query_product = Product.findById(product_id);
  </code></pre>
  
  <p>Always, when I want't to run the hook, throw me an error with this message:</p>
  
  <p><code>TypeError: Product.findById is not a function</code></p>
  
  <p>So. . . what's wrong?</p>
  
  <p>** If you ask how I import the product Model: <code>const Product = require('./product');</code> **</p>