title: nHibernate update not working for existing entity
body: <p>i am trying to update record with nHibernate. I tried several solutions, but none of them work (shows no error, bu data is alsno not updated).<br>
  First code:  </p>
  
  <pre><code>MyRepository rep = new MyRepository(GetCurrentSession());
  UserPost post = rep.GetById(id);
  post.ValidTo = date;
  rep.Update(post);
  </code></pre>
  
  <p>Second code:</p>
  
  <pre><code>ISession session = GetCurrentSession();
  MyRepository rep = new MyRepository(GetCurrentSession());
  UserPost post = rep.GetById(id);
  post.ValidTo = date;
  rep.Update(post);
  session.Update(post);
  session.Transaction.Commit();
  session = null;
  </code></pre>
  
  <p>Maybe somedy has a suggestion?</p>