title: Can't insert into MongoDB with Mongoose
body: <p>I'm trying to insert an object in <code>MongoDB</code> with <code>Mongoose</code>, but without success.
  In './models/user,js' I have:</p>
  
  <pre><code>var mongoDatabase = require('./db'); //I've connected to localhost here
  var database = mongoDatabase.getDb();
  var mongoose = require('mongoose');
  var Schema = mongoose.Schema;
  var userSchema = new Schema({
    user: String,
    adress: String,
  });
  
  userSchema.methods.testmethod = function(){
    console.log('test');
  }
  userSchema.methods.insert = function (obj) { //this works but what is the point to use Mongoose If I do it that way
    database.collection("users").insertOne(obj, function(err, res) {
          if(err) throw err;
          console.log("1 record inserted");
      });
  }
  var User = mongoose.model('User', userSchema);
  module.exports = User;
  </code></pre>
  
  <p>In './controllers/user.js'</p>
  
  <pre><code>var express = require('express');
  var router  = express.Router();
  var User    = require('../models/user');
  
  router.post("/", function(request, response) {  
      var obj = new User({
          user: request.body.name,
          adress: request.body.adress,
      });
  
      obj.testmethod(); //works fine
      obj.insert(obj); //throws an error
  
      User.insertOne(obj, function(err, res) { //error: insertOne is not a function
          if(err) throw err;
          console.log("1 record inserted");
      }); 
  });
  module.exports = router;
  </code></pre>
  
  <p>I have tried few more ways to do it, but without result. Can someone help me?</p>