title: Nhibernate Update does not persist change to database
body: <p>I have a problem getting my change(s) to data object retrieved using NHibernate to persist back into the database. I get no exceptions so it's difficult to know where to look. Any suggestions?</p>
  
  <pre><code>string name = "somenewname";
  string repositoryId = "somerepositoryid";
  
  ISession nhbSession = GetNhbSession(session);
  nhbSession.Transaction.Begin();
  try
  {
      RepositoryDto existingRepository = nhbSession.Get&lt;RepositoryDto&gt;(repositoryId);
      if (existingRepository == null || existingRepository.TimeDeleted != null)
          throw new Exception("Repository does not exist in system or is deleted. Cannot modify.");
  
      existingRepository.Name = name; //works fine up to here as expected; is in DB with old name
      nhbSession.Update(existingRepository);
      nhbSession.Transaction.Commit();
  }
  catch (Exception ex)
  {
      nhbSession.Transaction.Rollback();
      throw new Exception("Error modifying repository: " + ex.Message, ex);
  }
  
  
  &lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="SomeComponent"
    namespace="SomeComponent.Repository.DTO" auto-import="true" default-lazy="false"&gt;
    &lt;class name="RepositoryDto" table="Repository" mutable="false"&gt;  
      &lt;id name="RepositoryId" column="repositoryId" unsaved-value="0"&gt;
        &lt;generator class="assigned"/&gt;
      &lt;/id&gt;
      &lt;property name="SystemId" column="systemId" not-null="true" /&gt;
      &lt;property name="TimeCreated" column="timeCreated" not-null="true" /&gt;
      &lt;property name="TimeDeleted" column="timeDeleted" not-null="false" /&gt;
      &lt;property name="Name" column="name" not-null="true" /&gt;
    &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>