All,

I have the following scenario:

    Start Unit of work (SessionFactory.OpenSession())

    Get collection of Entities (e.g. 10 in size) from db

    Update only one entity

    Dispose the Unit of work (Where we call ISession.Flush())


The problem I am finding is that 10 update statements are generated -
one for each entity in the collection, even though I only actually
updated one entity.

How does NHibernate think that objects in the collection are dirty
even though they weren't updated?
I am using nullable types, is this the issue?
Ref: 
http://stackoverflow.com/questions/34852/nhibernate-session-flush-sending-update-queries-when-no-update-has-occurred

Is this the right way to be using the Session, should I be calling
Session.SaveOrUpdate() ?

Any help greatly appreciated...

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