title: NHibernate adonet.batch_size Not Working
body: <p>I have adonet.batch_size set to 10, but when I do a save on an object graph, it will save the object and all it's children in a separate database call.</p>
  
  <p>I am able to see this using the NHProf tool.</p>
  
  <pre><code>-- statement #1
  INSERT INTO Preferences
  -- statement #2
  INSERT INTO PreferencesToWidgets
  -- statement #3
  INSERT INTO PreferencesToWidgets
  -- statement #4
  INSERT INTO PreferencesToWidgets
  -- statement #5
  INSERT INTO PreferencesToWidgets
  -- statement #6
  INSERT INTO PreferencesToWidgets
  -- statement #7
  INSERT INTO PreferencesToWidgets
  -- statement #8
  INSERT INTO PreferencesToWidgets
  -- statement #9
  INSERT INTO PreferencesToWidgets
  -- statement #10
  INSERT INTO PreferencesToWidgets
  -- statement #11
  INSERT INTO PreferencesToWidgets
  -- statement #12
  INSERT INTO Users
  </code></pre>
  
  <p>Users is one-to-many to Preferences<br>
  Preference is many-to-one to PreferencesToWidgets</p>
  
  <p>Basically, I have a user that I add a preference to, and that preference has a bunch of preference-to-widgets added to it.</p>
  
  <p>I then call session.SaveOrUpdate( user ), and all the objects are inserted in separate calls, even though the batch size is set to 10.</p>
  
  <p>I am doing the configuration via FluentNHibernate.</p>
  
  <pre>
  Fluently.Configure()
  .Database(FluentNHibernate.Cfg.Db.MsSqlConfiguration.MsSql2005.ConnectionString(c => c.FromConnectionStringWithKey( connectionStringKey ) )
  .ProxyFactoryFactory( "NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu" ) )
  .Mappings( m => m.FluentMappings.AddFromAssembly( typeof( SessionFactoryFactory ).Assembly ) )
  .ExposeConfiguration( cfg => cfg.SetProperty( "generate_statistics", "true" ) )
  .ExposeConfiguration( cfg => cfg.SetProperty( "adonet.batch_size", "10" ) )
  .BuildSessionFactory();
  </pre>