NHibernate: Saving different types of objects in the same session breaks batching
问题 newbie here, sorry if this is an obvious question. It seems saving different types of objects in the same session breaks batching, cause significant performance drop. ID generator is set to Increment (as Diego Mijelshon advised, I tried hilo("100"), but unfortunately same issue, Test1() is still about 5 times slower than Test2()): public class CustomIdConvention : IIdConvention { public void Apply(IIdentityInstance instance) { instance.GeneratedBy.Increment(); } } AdoNetBatchSize is set to