You can use either IInterceptor.FindDirty() or an event listener or override FindDirty in your entity if it inherits ActiveRecordBase. See: http://www.codeproject.com/KB/cs/NHibernate_IInterceptor.aspx http://stackoverflow.com/questions/626931/data-auditing-in-nhibernate-using-events http://using.castleproject.org/display/AR/NHEventListenerSpecs
On Sep 9, 6:41 pm, ebrire <[email protected]> wrote: > This might be an easy question, but I couldn't find an answer > anywhere. > > I'd like to know if AR + NHibernate keep the previous vs changed > values in a buffer or any other place. A sample: > > Data Structure > int PK > string Name > > The original value is > > Name = "Jessica"; > > During the course of my application, the name gets changed to > > Name = "Angelina"; > > Before invoking the ActiveRecordMediator.Update(type) and posting the > new value, I'd like to know if I can check whatever was in the data > field before the change. > > Is there any easy way to do that with Active Record and > NHibernate? .NET's DataRow object provides me with such functionality, > and I couldn't find something similar in AR + NH. > > Thanks, > Ebrire --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
