title: A different object with the same identifier value was already associated with the session: XXX, of entity
body: <p>We have a ASP.NET MVC 3 C# project running NHibernate 3 and Castle.ActiveRecord for MySQL, and we trying to get  "one session per request" to work with <a href="http://docs.castleproject.org/Active%20Record.Web%20applications.ashx" rel="nofollow">this tutorial</a>.</p>
  
  <p>And it seems to work for some stuff, but when we do <code>SaveAndFlush()</code>, the command gives us an error:</p>
  
  <pre><code>A different object with the same identifier value 
  was already associated with the session: 142
  </code></pre>
  
  <p>And if we try to do only <code>Save()</code> we got the same message so it has nothing to do with the <code>Flush()</code> function.</p>
  
  <p>I have find some result when I search but nothing I can use to get it to work.</p>
  
  <p>Something I have not tested because I don't know how I do, is,</p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id")
  </code></pre>
  
  <p>Any ideas?</p>