title: MongoDB: how to set collection version?
body: <p>I'm currently using MongoDB and I have a collection called <strong>Product</strong>. I have a requirement in the system that asks to increment the collection version whenever any change happens to the collection (e.g. add a new product, remove, change price, etc...).</p>
  
  <p><strong>Question:</strong> Is there a recommended approach to set versions for collections in MongoDB?</p>
  
  <p>I was expecting to find something like that:</p>
  
  <pre><code>db.collection.Product.setVersion("1.0.0");
  </code></pre>
  
  <p>and the corresponding get method:</p>
  
  <pre><code>db.collection.Product.getVersion();
  </code></pre>
  
  <p>I'm not sure if it makes sense. Personally, I would love to have <strong>collection</strong> metadata provided as a native implementation from MongoDB. Is there any document database that does so?</p>