We're using NHibernate version 4.0.4.4000 and configuring it with FluentNHibernate version 2.0.3.0.
I'm trying to setup batching on an Oracle connection with the Oracle Data Client Batching Batcher Factory (OracleDataClientBatchingBatcherFactory) and using the following code to create NHConfiguration:
var cfg = new NHibernate.Cfg.Configuration().DataBaseIntegration(prop => {
prop.BatchSize = 1000;
prop.Batcher<OracleDataClientBatchingBatcherFactory>();
});
Getting the following exception on session flush:
System.NullReferenceException: Object reference not set to an instance of an object.
at NHibernate.AdoNet.OracleDataClientBatchingBatcher.SetArrayBindCount(Int32 arraySize)
at NHibernate.AdoNet.OracleDataClientBatchingBatcher.DoExecuteBatch(IDbCommand ps) ...
It looks like SetArrayBindCount method is using reflection to set ArrayBindCount property in OracleCommand. This method throws a null reference exception.
Did anyone else experience the same problem? Am I missing something or it's a bug in OracleDataClientBatchingBatcher?
I do not get this problem when I use the SQL Client Batching Batcher Factory (SqlClientBatchingBatcherFactory)
var cfg = new NHibernate.Cfg.Configuration().DataBaseIntegration(prop => {
prop.BatchSize = 1000;
prop.Batcher<SqlClientBatchingBatcherFactory>();
});
Any help will be greatly appreciated as this is currently blocking us.
Question Origin: https://groups.google.com/forum/#%21topic/nhusers/-rzStjZSxmI