1. [color=orange]Hibernate Interceptor OnFlush Dirty Problem... forum.hibernate.orgUpdation Problem in Interceptor. Here is the Scenario. 1. When Updating Value in the Interceptor, The Values are not updated in the database. This is what My Implementation. 2. OnFlushDirty Method Code. public boolean onFlushDirty(Object entity,Serializable id,Object[] currentState,Object[] previousState,String[] propertyNames,Type[] types) { auditingInfo.setLastUpdatedBy(userID); auditingInfo.setDateLastUpdated(getGMTDate()); } DAOIMPL Method. public void updateCustomFieldSet(Pojo pojo) { getHibernateTemplate().update(pojo) ; logger.info("------------------ AFTER -- Created By-------------------- : " ... |
2. Dirty Tracking with Interceptor forum.hibernate.orgHi there. I need a solution to the following problem. Cause of business rules I need to track every change to the database in a seperate log. I had a look at some posts and now I think I could use an Interceptor where a add the functionality to the findDirty method. I also thougt of using an JPA EntityListener but ... |
3. How to know if an entity is dirty: Interceptor forum.hibernate.orgHi: Before I update an entity from the database I want to know if it's dirty or not, and if it's not dirty I won't call the save method. I've read around and I've seen that hibernate gives us an utility called Interceptor. In the book it appears a long class with onLoad, etc... methods for making a log, but I ... |