mappings?

2011/1/6 João Bragança <[email protected]>

> I am trying to get statement batching to work with updating:
>
> using (var session = factory.OpenSession())
> using (var tx = session.BeginTransaction())
> {
>     session.FlushMode = FlushMode.Commit;
>     foreach (var id in idList) // I realize this is not a best
> practice
>     {
>          var item = session.Get<Item>(id);
>          item.DoSomething();
>     }
>     tx.Commit();
> }
>
> I am expecting to see the update statements in a batch on tx.Commit(),
> instead I see one update statement per entity. But when I do something
> like the above, except creating the entities and calling
> session.Save(), the batching is working as expected.
>
> Does it matter that I am using a composite primary key? Does it matter
> that I have lazy loading disabled (I realize this is also not a best
> practice)? Did I just miss something in the docs? I can provide a
> sample mapping if need be.
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
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.

Reply via email to