Reputation: 200
When setting the ado.batch_size property on the nhibernate configuration it is ignored. If I debug the session it shows the batch size as 1 even though I set it to 25.
Does NHibernate 3.3.3 support batching for Sybase Anywhere?
Upvotes: 1
Views: 98
Reputation: 200
No batching is only supported for the SQL Server Client and Oracle Client. The Sybase driver uses the NonBatchingBatcher which means no batching.
Extended Driver to use batching
I've created a Batcher for NHibernate http://pastebin.com/gbPs6w4a
Sample configuration
The key line is db.Driver
Configuration.DataBaseIntegration(
db =>
{
db.ConnectionString = "Some Connection String"
db.KeywordsAutoImport = Hbm2DDLKeyWords.None;
db.Driver<SybaseSQLAnywhereDotNet4WithBatcherDriver>();
db.Dialect<SybaseSQLAnywhere12Dialect>();
db.BatchSize = 25;
db.LogSqlInConsole = showSqlInConsoleWindow;
db.LogFormattedSql = showSqlInConsoleWindow;
});
Upvotes: 1