I am currently thinking about implementing an application with NHibernate and I would like to be able to solve concurrency issues by showing the user which fields have changed since he retrieved the instance. So the user should have the possibility to compare his entered values with the one in the database and then decide which ones to use.
From what I have read NHibernate throws an Exception when stored information is persisted and the version field is different to the value in the database. Does this exception include some kind of information about the object in the database or do I have to query the database again to get the data object and compare it with my user manipulated object?
Maybe someone has already done something similiar and wants to share the code.
If you're doing this inside the same session, maybe this can help you