title: Get the original query object in Mongoose
body: <p>I have a loop to perform multiple queries through Mongoose</p>
  
  <pre><code>"use strict";
  
  var Mongoose = require("mongoose");
  var User     = Mongoose.model("User");
  var Cache    = {};
  
  for (var index=0; index&lt;usernames.length; index++) {
      var query = {
          username:usernames[index]
      };
  
      User.find(query).
      exec(function(error,users){
          //THIS IS A CALLBACK FUNCTION,
          //HOW TO GET THE 'query' VARIABLE ABOVE?
          //I WANT TO PUT THE RESULT INTO CACHE:
          var username    = users[0].username;
          Cache[username] = users[0];
      });
  }
  </code></pre>
  
  <p><strong>I need to know which result is of which query, in the callback function above.
  It is for db query caching purpose.</strong> I can extract 'username' from 'users[0]', but when the array 'users' is empty, there's no such thing.</p>