-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with creating audit logs using interceptor
PostPosted: Thu Jan 15, 2009 2:57 am 
Newbie

Joined: Thu Jan 15, 2009 2:10 am
Posts: 1
Hi All,
I'm trying to use hibernate interceptor for creating audit logs.
I have a table 'tickets' which has many-to-many association with another table 'developer' and 'tkt_ticket_assignment' holds the tickets and developer assigments.. My hbm.xml looks like this.

Code:
<class name="com.cgi.its.model.Ticket" table="tickets">
      <id name="id" column="its_id">
         <generator class="identity"/>
      </id>
      <property name="gppiId" column="ticket_id"/>
      <property name="createdBy"   column="created_by"/>
      <property name="createdDate"   column="created_date"/>
      <property name="summary" column="summary"/>
      <property name="description" column="description"/>
                   <set name="assignedDevelopers" table="tkt_ticket_assignment" cascade="save-update">
             <key column="its_id"/>
          <many-to-many  class="com.cgi.its.model.Developer" column="user_id"/>
      </set>
  </class>



Now the requirement is whenever i update an existing ticket, my interceptor should create a row in the audit_log table giving details like who updated, what and when. If I update 'assigneddevelopers ' with any other field audit log works fine. but if i update only 'assignedDevelopers' feild no entry is getting created in the audit_log table. Can somebody help me out in this? Thanks in advace.

Regards
Kavitha


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.