title: Hibernate One To Many Unidirectional Mapping List
body: <p>I have <code>one-to-many</code> relationship between parent and child Java objects. The parent object uses <code>java.util.List</code> that stores multiple child objects. The problem I am experiencing is when updating the parent object after I have added one or more child object(s) to the <code>List</code> in the parent. I am using the <code>saveOrUpdate</code> method to save or update the parent. It works fine if I am saving a new instance of the parent, but after saving it, I try to add child object(s) into the parent <code>List</code> and then attempt to call <code>saveOrUpdate</code> on the parent object, but no entries of child object(s) get persisted into the database. I just would like some pointers. <strong>Note</strong>: I am not using annotations. <br>A snippet of the <strong>Parent.hbm.xml</strong>, that defines the one-to-many unidirectional relationship:</p>
  
  <pre><code>  &lt;list name="children" cascade="all"&gt;
       &lt;key column="parent_id"/&gt;
       &lt;index column="idx"/&gt;
       &lt;one-to-many class="Child"/&gt;
    &lt;/list&gt;
  </code></pre>