title: NHibernate collection mapping: it's deleting and inserting instead of updating
body: <p>I'm not sure how to map a collection to update.
  I have 2 tables:</p>
  
  <ul>
  <li>Object - has a composite PK of 3 ints</li>
  <li>ObjectAliases - has a FK to Object and a nvarchar PK for Name, obviously name is unique</li>
  </ul>
  
  <p>Object can have many aliases but alias name is unique for each object.</p>
  
  <p>So I need to list aliases in my Object, so I did:</p>
  
  <pre><code>public virtual IList&lt;string&gt; Aliases { get; set; }
  </code></pre>
  
  <p>and my mapping is:</p>
  
  <pre><code>&lt;bag name="Aliases" table="Aliases" cascade="all-delete-orphan" lazy="true"&gt;
    &lt;key&gt;
      &lt;column name="OtpadId_Djelatnost" sql-type="nvarchar"/&gt;
      &lt;column name="OtpadId_Proces" sql-type="nvarchar"/&gt;
      &lt;column name="OtpadId_Vrsta" sql-type="nvarchar"/&gt;
    &lt;/key&gt;
    &lt;element column="Ime" type="String"/&gt;
  &lt;/bag&gt;
  </code></pre>
  
  <p>I can create and delete object from Aliases list without a problem, Nhibernate will insert and delete fine. But how can I rename an Alias? I have FKs to Alias by name and when I rename an alias I want NHibernate to do sql UPDATE so UPDATE CASCADE executes on all FKs, referencing the new name.</p>
  
  <p>If I do:</p>
  
  <pre><code>object.Aliases[0] = "test";
  </code></pre>
  
  <p>Nhibernate will try to do a INSERT instead of UPDATE.. how can I make it do an UPDATE?</p>
  
  <p>Thank you all.</p>