Note that there are some explanatory texts on larger screens.

plurals
  1. POFluent + SQLite : Exception on SetBatchSize()
    primarykey
    data
    text
    <p>I'm trying to setup Fluent NHibernate to allow me to do batching. A NotSupportException is being thrown when I try to session.SetBatchSize(x) that states, "No batch size was defined for the session factory, batching is disabled. Set adonet.batch_size = 1 to enable batching." However, when I examine the SessionFactory properties there is an entry [adonet.batchsize, 1] . Is there something I'm blatantly overlooking here? </p> <p>Factory Creation : </p> <pre><code>factory = Fluently.Configure() .Database( SQLiteConfiguration.Standard .UsingFile(fileName).AdoNetBatchSize(1) ) .Mappings(m =&gt; m.FluentMappings.AddFromAssemblyOf&lt;Person&gt;()) .ExposeConfiguration(BuildSchema) .BuildConfiguration() .BuildSessionFactory(); </code></pre> <p>Insert Function :</p> <pre><code> using(var session = factory.OpenSession()) using (var transaction = session.BeginTransaction()) { session.SetBatchSize(1); //Exception is being thrown here. session.Save(myPerson); //myPerson uses an assigned Id (not Identity) transaction.Commit(); } </code></pre> <p>The exception is also thrown if I manually set the property itself instead of using the AdoBatchSize method (i.e. config.Properties["adonet.batch size"] = "1"; ). Does anything have to be set in the App.Config for batching to working with Fluent NHibernate? This Exception seems to be coming from the setter of the BatchSize property of NonBatchingBatcher which throws the argument if you attempt to set it. If the configuration property for adonet.batch_size is set on the SessionFactory why is it using NonBatchingBatcher versus a SqlClientBatcher?</p> <p>Thanks, Dubs.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload