Regular |
|
Joined: Tue Oct 07, 2003 1:13 pm Posts: 70 Location: Paris, France
|
Hibernate version:2.1.7
Hi,
I've created an auditlog interceptor from the CaveatEmptor example (AuditLogInterceptor) that logs the old and new value of a field when this one has changed, this is called from the onFlushDirty method. To retrieve the dirty fields, I've used the TypeFactory.findDirty(...) method that does its job. My only problem is the SessionImplementor argument that I dont have , so I pass the null argument until I got a NPE when comparing 2 entities. The SessionImplementor is used to retrieve the indentifier of the entity and so can make a comparison.
How could I get this SessionImplementor from the interceptor (I have already a session ttached to the interceptor) ? Or is there another way than using the TypeFactory.findDirty(...)?
Thank you a lot for your great support.
Richard.
|
|