Some interesting aspects here. Fabio, you suggest the
INotifyPropertyChanged event. I have some points about that suggestion
(hoping to get responses, because I am trying to wrap my head around
the best way to do these things).

First, you would have to use the nosetter.* strategy to fill the
property, otherwise the INotifyPropertyChange event would be raised
during enttiy hydration - correct?

Second, what if the Address to log has several properties, like
Street, City, Zip code, etc. In that case you wouldn't want to log
each and every property change. So I would suggest that the
INotifyPropertyChange event registers the change in address, and that
a BeforeTransactioCommit interceptor then logs all registered Address
changes. Make any sense? BTW. will there be an EventListener for
BeforeTransactionCommit in the future? Why is that event not in the
listeners - any special reason.

Lastly, what if the property is changed in a transient or detached
entity and the entity is never SavedOrUpdated? Again,
INotifyPropertyChanged would not account for this. In this case the
INotifyPropertyChanged event would need to check if the entity is
persistent. Again, does that sound right?

enjoy,
Ramin

On Oct 12, 10:19 am, Igor <[email protected]> wrote:
> BTW why don't you use Interceptor to do all this logging stuff?
> And maybe it will be more reliable to put this logic into DB itself
> (trigger, or stored procedure for create/update)...
--~--~---------~--~----~------------~-------~--~----~
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