Using NHibernate to determine which fields were updated (for validation purposes) before
Before saving the updates to my business entities, I need to perform validation checks to determine which properties have changed. For example, some fields may only be updated when the "Status" property has a specific value. For instance. when the order object has the status completed, only the notes field (line) can be updated. Is this possible with NHibernate, or should I track changes myself in the business objects?
a source to share
If I understand what you are trying to do, Gabriel's solution is not exactly what you want. If it isn't, you can try an event listener . They allow you to hook into a general event (like on save) and do some processing before NHibernate completes the save / insert / update / delete. Alternatively, you can explore the use of interceptors by implementing the IInterceptor interface.
a source to share
This kind of thing is really possible. Coding Instinct has a great post introducing NHibernate.Validator .
a source to share