The batch is per persister.If you want you can try a different behaviour but take care... don't feel so happy at the first success, try it in some complex scenario saving objects graph with different association/aggregation.
2009/10/19 fknebels <[email protected]> > > I'm running into the same problem. When I strip down my code and only > insert into one table (mapped type), the batching works correctly. > Once I try to batch across a number of types, the statements no longer > are batched. > > Is this by design? if it's just grouping sql statements together, > shouldn't it be able to do them across type? > > The documentation (Chapter 12. Batch processing) doesn't seem to > mention this issue. > > Any information would be appreciated, > --Fran > > On Oct 16, 7:53 am, arnesten <[email protected]> wrote: > > Hi! > > > > I have 3 classes, lets call them X, Y and Z. They all use HiLo to > > generate IDs. Y and Z reference X. The problem is that I get the > > following SQL-statements when using NHProfiler: > > > > Statement 1: INSERT INTO X VALUES(..) > > Statement 2: INSERT INTO Y VALUES(..) > > INSERT INTO Y VALUES(..) > > INSERT INTO Y VALUES(..) > > Statement 3: INSERT INTO Z VALUES(..) > > > > I understand that X needs to be inserted alone, but the other two > > statements I do not know why they are not batched together. > > > > To clarify this is what I want: > > > > Statement 1: INSERT INTO X VALUES(..) > > Statement 2: INSERT INTO Y VALUES(..) > > INSERT INTO Y VALUES(..) > > INSERT INTO Y VALUES(..) > > INSERT INTO Z VALUES(..) > > > > I'm using NHibernate 2.1 and I have setadonet.batch_sizeto 20. > > > > Is it a limitation of NHibernate that types are batched type by type? > > Or am I doing something wrong? > > > > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
