title: How do I create an automatic field in Mongoose?
body: <p>I have a model that looks like:</p>
  
  <pre><code>var CompanySchema = new Schema({
      name: String
    , logoUrl: String
    , created: {
        type: Date,
        default: new Date().toUTCString() 
    }
    , deleted: {
        type: Date,
        default: null 
    }
  });
  </code></pre>
  
  <p>I want to have a field called <code>id</code> as well (this is on top of the <code>_id</code> that already gets added). So how can I create the <code>id</code> field and have it automatically assigned to the value of <code>_id</code>?</p>