I am using NHibernate here with C #. I have a cache of nhibernate objects that have lazily loaded objects inside those that may have changes written for them. I need a way to determine if there are changes that need to be saved. It’s quite a lot of effort for setting flags when one little thing changes, and it’s also quite annoying to compare the cache with a copy of the original (due to lazy loading).
Just wondering if there is a way I can use the current session object to find out if there are pending changes that need to be written to db, that means I can get the “do you want to save” prompt if changes actually occur . I can not autosave, the client requires a save button.
source
share