Hi All
i am trying to work with envers and hibernate 3.5.3 and issue is that it is creating the _aud tables that it is supposed to but when I try ot update the pojo object that has the @audited annotation on it. There is no insert happenign in the _aud table. the values get saved in the DB for the pojo and everything else is working as it was before envers but envers is not working. It does create the audit table for the audited object.
I am using jboss 5.1 and spring and hibernate 3.5.3. I have also registered the listeners in my hibernate.cfg.xml
Code:
<listener class="org.hibernate.envers.event.AuditEventListener" type="post-insert"/>
<listener class="org.hibernate.envers.event.AuditEventListener" type="post-update"/>
<listener class="org.hibernate.envers.event.AuditEventListener" type="post-delete"/>
<listener class="org.hibernate.envers.event.AuditEventListener" type="pre-collection-update"/>
<listener class="org.hibernate.envers.event.AuditEventListener" type="pre-collection-remove"/>
<listener class="org.hibernate.envers.event.AuditEventListener" type="post-collection-recreate"/>
I am sure this is how you register your listeners within the session-factory tag in the hibernate.cfg.xml
Is there something about spring that when i use the hibernateTemplate.update(); that it doesnot see this event hapening.??
Will appreciate your help. Thanks.