title: Batch Update, Delete, Insert not work correctly with version control
body: <p>I'm using Nhibernate 3.2 and fluent nhibernate, I have two tables Customer Group and Customer, and I use for lock management version control with TimeStamp Column.
  I have the following classes and maps for these classes:</p>
  
  <pre><code>public class Customer
  {
      public Customer()
      {
      }
      public virtual int CustomerID { get; set; }
      public virtual CustomerGroup customerGroup { get; set; }
      public virtual int CustomerGroupID { get; set; }
      public virtual string CustomerRef { get; set; }
      public virtual string NameE { get; set; }
      public virtual string NameA { get; set; }
      public virtual byte[] TimeStamp { get; set; }
  }
  </code></pre>
  
  <p>and his map</p>
  
  <pre><code> public class CustomerMap : ClassMap&lt;Customer&gt; {
  
      public CustomerMap() {
          Table("Customer");
          Id(x =&gt; x.CustomerID).GeneratedBy.Identity().Column("CustomerID");
          Version(x =&gt;x.TimeStamp).CustomType("BinaryBlob").Generated.Always().Column("TimeStamp");
          DynamicUpdate();
          OptimisticLock.Version();
          References(x =&gt;x.customerGroup).Column("CustomerGroupID").ForeignKey("CustomerGroupID");
          Map(x =&gt; x.CustomerRef).Column("CustomerRef").Length(30).Unique();
          Map(x =&gt; x.NameE).Column("NameE").Not.Nullable().Length(100).Unique();
          Map(x =&gt; x.NameA).Column("NameA").Length(100);
  </code></pre>
  
  <p>and for Customer Group:</p>
  
  <pre><code> public class CustomerGroup {
      public CustomerGroup() {
         Customers = new List&lt;Customer&gt;(3);
       }
      public virtual int CustomerGroupID { get; set; }
      public virtual IList&lt;Customer&gt; Customers { get; set; }
      public virtual byte[] TimeStamp { get; set; }
     }
  </code></pre>
  
  <p>and his map:</p>
  
  <pre><code> public CustomerGroupMap() {
          Table("CustomerGroup");
          Version(x =&gt; x.TimeStamp).CustomType("BinaryBlob").Generated.Always().Column("TimeStamp");
          DynamicUpdate();
          OptimisticLock.Version();
          Id(x =&gt; x.CustomerGroupID).GeneratedBy.Identity().Column("CustomerGroupID");
          HasMany(x =&gt; x.Customers).KeyColumn("CustomerGroupID");
    }
  </code></pre>
  
  <p>When I create update in list of customers belong to specific Customer Group like this:</p>
  
  <pre><code>        ISession Session = OpenSession();
          Session.BeginTransaction();
          var customerGroupInfo = Session.Query&lt;CustomerGroup&gt;().Fetch(x =&gt; x.Customers).Single&lt;CustomerGroup&gt;(x =&gt; x.CustomerGroupID == 98);
          foreach (var item in customerGroupInfo.Customers)
          {
              item.NameE = "abc";
              Session.Update(item);
          }
          Session.Transaction.Commit();
  </code></pre>
  
  <p>apply these sql statements:</p>
  
  <pre><code>UPDATE Customer SET    NameE = 'abc' 
  WHERE  CustomerID = 200 AND TimeStamp = 0x00000000000092EF  
  
  SELECT customer_.TimeStamp as TimeStamp1_ FROM   Customer customer_
  WHERE  customer_.CustomerID = 200 
  
  UPDATE Customer SET    NameE = 'abc'
  WHERE  CustomerID = 201 AND TimeStamp = 0x00000000000092F0 
  
  SELECT customer_.TimeStamp as TimeStamp1_ FROM   Customer customer_
  WHERE  customer_.CustomerID = 201
  </code></pre>
  
  <p>.
  .
  .</p>
  
  <p>and every update and every select operate in single round trip.
  I set property adonet.batch_size property in configuration like this:</p>
  
  <pre><code>&lt;property name="adonet.batch_size"&gt;20&lt;/property&gt;
  </code></pre>
  
  <p>I read in <a href="http://fabiomaulo.blogspot.com/2011/03/nhibernate-32-batching-improvement.html" rel="nofollow">this post</a> this behavior founded by default in Nhibernate 3.2.
  Any Tips to make batch work correctly?</p>