Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't NHibernate support batching on MySql

I've found a couple places where people say it's not supported, but I can't find what the root cause is.

  • Is there an issue with the mysql ado.net provider?
  • Is there something about MySql itself?
  • Has it just not been implemented?

I recently found this patch for nHibernate that may resolve the issue, has anyone verified this as a workaround?

Is there another unsupported workaround?

like image 999
Greg Roberts Avatar asked Aug 01 '11 15:08

Greg Roberts


1 Answers

  • Has it just not been implemented?

Is the right answer.

The patch using a reference to MySql.Data will not get into the trunk in its current form because of the reasons mentioned by Rippo.

However, you don't need to compile NH with the patch. You can just inject the new Batcher.

It's as easy as:

config.DataBaseIntegration(
       db => db.Batcher<MySqlClientBatchingBatcherFactory>());
like image 126
Diego Mijelshon Avatar answered Nov 14 '22 07:11

Diego Mijelshon