title: Nhibernate - Mapping List doesn't update List indexes
body: <p>I'm having one self-referencing class. A child has a reference to its parent and a parent has a list of children. Since the list of children is ordered, I'm trying to map the relation using NHibernate's .</p>
  
  <p>This is my mapping:</p>
  
  <pre><code>&lt;class name="MyClass"&gt;
    &lt;id name="Id"&gt;
      &lt;generator class="native"/&gt;
    &lt;/id&gt;
    &lt;list name="Children" cascade="delete" inverse="true"&gt;
      &lt;key column="ParentId"/&gt;
      &lt;index column="ListOrder"/&gt;
      &lt;one-to-many class="MyClass"/&gt;
    &lt;/list&gt;
    &lt;many-to-one name="Parent" class="MyClass" column="ParentId"/&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p>The problem I'm having is when having a bi-directional mapping child&lt;->parent, the list index (ListOrder) isn't updated in the database when I do my CRUD dance. This means that when I e.g. remove a child, I get holes in the children list after saving to the database and fetching the parent again. If I remove the bidirectionality, by not having a many-to-one from the children to the parent (and no inverse=true), the ListOrder is updated correctly.</p>
  
  <p>Have any of you seen this before? Is there any simple solution?</p>