title: Insert new Mongo doc only if new using Morphia
body: <p>I'm using Morphia. </p>
  
  <p>My doc is a POJO:</p>
  
  <pre><code>Hotel{
      @Id
      private long hotelID;
      private String anotherField1;
      private String anotherField2;
      private String anotherField3    
  }
  </code></pre>
  
  <p>What is the proper way to insert a hotel in MongoDB <strong>but only if it is a new <code>hotelID</code>?</strong></p>
  
  <p>I am aware of the <code>update</code> method with the "<code>createIfMissing</code>" parameter in Morphia (<a href="https://github.com/mongodb/morphia/wiki/Updating" rel="nofollow">https://github.com/mongodb/morphia/wiki/Updating</a>). But my operation is not an update, but a simple save (yes/no depending on the existence of the POJO in the db).</p>
  
  <p>Any advice on the best way to proceed is appreciated.</p>