title: Is it possible to get the model from the document in mongoose?
body: <pre><code>var UserSchema = new Schema({...}); // Schema
  var User = mongoose.Model('User', UserSchema); // Model
  var user = new User({...}); // Document
  </code></pre>
  
  <p>given just the document (user in this case), is there an easy way to get the model (User in this case) without prior knowledge about what model the document refers to? There's a user.schema, but as far as I can tell, no user.model.</p>
  
  <p>The context is given a document and a path, I want to tell if there are other objects with an equal value for that path in the DB.</p>
  
  <p>Thanks.</p>