title: .find is not a function error
body: <p>I'm developing a node js rest server and having an issue with my Schema queries. When I hit my end points I get the error <code>TypeError: user.find is not a function</code></p>
  
  <p>The following is my user.js file</p>
  
  <pre><code>var {mongoose} = require('../../dbcore/mongoose');
  var Schema = mongoose.Schema;
  
  module.exports = mongoose.model('User',new Schema( {
  
      basicId: Schema.ObjectId,
  
      activePurchaseIDs: {
          type: [Schema.ObjectId],
          default: []
      },
  
      activeOrderIDs: {
          type: [Schema.ObjectId],
          default: []
      },
  
      paymentOptionIDs: {
          type: [Schema.ObjectId],
          default: []
      },
  
      addressIDs: {
          type: [Schema.ObjectId],
          default: []
      },
  
      interestIDs: {
          type: [Schema.ObjectId],
          default: []
      }
  
  }));
  </code></pre>
  
  <p>and this is where it's imported/required.</p>
  
  <pre><code>var URLS = require('./urls');
  var User = require('../schemas/user/user');
  
  function init(app,mongoose) {
  
      app.get(URLS.USERS_URL,(req,res)=&gt;{
  
          var user = new User({});
  
          user.find().then((users)=&gt;{
              res.send({users});
          },(err)=&gt;{
              res.status(400).send(err);
          });
  
  
      });
  
  
  
  }
  
  module.exports = init;
  </code></pre>
  
  <p>I was following a tutorial while writing this code and I was expecting it to work as I followed the tutorial step by step.</p>