After digging into HiA Auditable interceptor example, I guess onFlushDirty is where I can handle the "UPDATE" object, where onSave only for "INSERT" object. Am I right?
Also the JavaDoc of the two method seems indicating that these two methods are called in totally different place. onFlushDirty is called during session flush. I.e. session.update(object) doesn't invoke onFlushDirty method on a session interceptor. However, session.save(object) will invoke onSave method on a session interceptor. Am I right?
Thanks for shedding some lights here.
- Wei Chen
|