title: INSERT instead of UPDATE with Hibernate
body: <p>I have a class that I'm persisting with Hibernate. It is stored within a bag and uses a sequence generator to generate its ID, as below:</p>
  
  <pre><code>&lt;class name="Parent"&gt;
    &lt;id name="id" /&gt;
    &lt;bag name="children" access="field"&gt;
      &lt;key column="parent_id" not-null="true" /&gt;
      &lt;one-to-many class="Child" /&gt;
    &lt;/bag&gt;
  &lt;/class&gt;
  
  &lt;class name="Child"&gt;
    &lt;id name="id"&gt;
      &lt;generator class="sequence"&gt;
        &lt;param name="sequence"&gt;child_seq&lt;/param&gt;
      &lt;/generator&gt;
    &lt;/id&gt;
  
    &lt;many-to-one name="status" not-null="true" cascade="none" /&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p>When the status property of Child is modified, a new Child record should be INSERTed instead of the old one being UPDATEd. However, Hibernate UPDATEs. Is there any way to tell Hibernate that it should INSERT, or will I have to manage it myself outside the bag?</p>