2012/9/27 Arman <[email protected]>

> All of my class is marked with dynamicupdate() too.
> i think because nhibernate does not use proxy , so it cannot find with
> property is dirty and which one is not. so it updates all of its property
> and all of its relations properties.
>

No. Proxies are not important for dirty tracking.

If you do session.Get<MyType>(someId) you will also NOT get a proxy. And
NHibernate will not issue an update statement unless you actually do change
something.


On the other hand, there should be no reason to call SaveOrUpdate() if the
objects are already attached to the session. Though it shouldn't normally
cause a problem either.


If you do session.Get<Order>(someOrderId) for one of the same orders, in a
session by itself and then flush without doing any deliberate changes, does
it still update? Sometimes mapping irregularities cause NHibernate to think
a property is dirty even though the application itself hasn't changed it.


For indexed collections there is also lazy="extra" to not load all
collection members unless necessary. But again, I suspect the problem here
lies elsewhere.

/Oskar

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