2013-01-08 25 views

回答

2

你需要設置的屬性是調用「adonet.factory_class」這一點。使用以下任何一種:

<property name="adonet.factory_class">assembly-qualified-name</property> 

configuration.SetProperty(
    Environment.BatchStrategy, 
    typeof(MySqlClientBatchingBatcherFactory).AssemblyQualifiedName); 

或在分批本身(https://github.com/Andorbal/NHibernate.MySQLBatcher)的自述文件指出

config.DataBaseIntegration(db => 
    db.Batcher<MySqlClientBatchingBatcherFactory>());