title: Mongoose populate return undefined
body: <p>I'm currently trying to develop an app using mongo and node.js.</p>
  
  <p>I am facing a problem when I want to build a query who use the populate option.</p>
  
  <p>Here are my Schemas :</p>
  
  <pre><code>// Schema used by mongoose
  var userSchema = new mongoose.Schema(
  {
     _id:        mongoose.Schema.Types.ObjectId,
     login:      String,
     password:   String,
     movies:     [ { type: mongoose.Schema.Types.ObjectId, ref: movieModel} ],
     admin:      Boolean
  },{ collection: "user" });
  
  var movieSchema = new mongoose.Schema(
  {
     _id:           mongoose.Schema.Types.ObjectId,
     title:         String,
  }, { collection: "movie" });
  </code></pre>
  
  <p>As you can see, each user have an array of movies, this array contains valid ids of movies. What I want is to have the movies of an user. This is how I build my query :</p>
  
  <pre><code>var query = userModel.findOne({ login: req.session.user["login"] })
                          .populate("movies");
  
  query.exec(function(err, user)
  {
     if (err)
        throw err;
  
     console.log(user.movies[0].title);
  });
  </code></pre>
  
  <p>The query is executed successfully, but when I try to display the title of the first movie at the console.log line I got an error "TypeError: Cannot read property 'title' of undefined". I checked the documentation of mongoose and don't understand why I'm getting this error.</p>
  
  <p>I would like to specify that my database contains valid data.
  I put mongoose in debug mode, and this is the query that is executed :</p>
  
  <pre><code>Mongoose: user.findOne({ login: 'user' }) { fields: undefined }  
  Mongoose: user.find({ _id: { '$in': [ ObjectId("52e2a28949ad409834473e71"), ObjectId("52e2a28949ad409834473e79") ] } }) { fields: undefined }
  </code></pre>
  
  <p>The two ids on the second line are valid ids of movies. I would like to display their name.</p>
  
  <p>Thanks a lot for your help.</p>