title: mongoose model fields not appearing in mongoDB
body: <p>I'm working on a personal project building a web application and teaching myself <code>node.js</code>. The part I'm working on involves uploading a CSV file, changing the CSV data into a JSON object and saving it in a field in mongodb</p>
  
  <p>using mongoose I have this model defined. I'm using <a href="http://robomongo.org/" rel="nofollow">Robomongo</a> to look at the contents of the DB and I can see email and passwordfields not problem</p>
  
  <pre><code>var userDataModel = new schema({
          email: {
                      type: String,
                      required: true,
                      unique: true,
                      validate: [validator.email, 'Not a valid email address!']
                  },
  
              hashedPassword: {
                                  type: String,
                                  required: true,
                                  validate: [checkLength, 'The Password is too short! Passwords must be at least '+REQ_PASS_LENGTH+' characters!']
                              },
              savedGraphs:{},
              uploadedFiles:{}
          })
  </code></pre>
  
  <p>The following is a file-handling module I wrote to call to be used during my route handling on the post request from the form containing the csv file.</p>
  
  <pre><code>var Converter               =   require("csvtojson").core.Converter
  var currentdate             =   new Date()
  exports.verifyFileTypeCSV   =   verifyFileTypeCSV
  exports.saveFileDataCSV     =   saveFileDataCSV
  
  function verifyFileTypeCSV(fileType){
      if(fileType!='application/csv'){
          return false
      }
      else{
          return true
      }
  }
  
  function saveFileDataCSV(file, username, password, model){
      model.findOne({ email :  username },
          function(err, user) {
              if (err){
                  console.log('err')
              }
              if (!user){
                  console.log('no user found!')
              }
              else{
                  var csvConverter = new Converter()
                  csvConverter.on("end_parsed",function(jsonObj){
                      jsonObj.date = currentdate.getDate()
                      user.uploadedFiles = jsonObj
                  })
                  csvConverter.from(file)
              }
      })
  }
  </code></pre>
  
  <p>All the code seems to execute and I'm doing the exact same thing as I did the save the username/pass but once I run through it and check the DB, the userModel wont contain the parsed CSV data. I've printed the data to the console etc. so it's being parsed correctly and that's not my problem.</p>
  
  <p>P.s</p>
  
  <p>This is code I'm currently playing with, hence the <code>if/else</code> sections having console statements and nothing else.</p>