Inherit DefaultFlushEntityEventListener, override DirtyCheck method, and
configure your listener.

2010/1/6 Dor Rotman <[email protected]>

> Hello,
> I'd like to override the default dirty-checking mechanism and combine
> it with a "dynamic update" property to the object.
> My assumption is that I can then control which properties will be
> updated, in order to enforce some field level security.
>
> So a few questions regarding this:
>
> 1. If dynamic update is activated for a class, and only some of its
> fields were changed, is there a scenario in which NH still execute a
> full UPDATE command with all the fields in it?
>
> 2. Is using an interceptor a good idea at all? I've seen that using
> Event Listeners is recommended over interceptors, yet no event
> listener implements a dirty checking mechanism. Is it known whether
> interceptors will be supported or deprecated in the future?
>
> 3. I'd like to check for dirtyness in the FindDirty method of the
> interceptor. I've seen in the NH code a call to
> StandardProperty.IsDirtyChekable. Is there any way for me to use this
> method as well, from the interceptor? How do I get the
> StandardProperty array representing the current entity?
>
> Thanks a lot! :)
> Dor.
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
>
>


-- 
Fabio Maulo
--
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