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: Hibernate Interceptor - composite object how to log ?
PostPosted: Fri Oct 22, 2010 2:05 pm 
Newbie

Joined: Wed Jul 07, 2010 6:33 pm
Posts: 6
I am trying to audit database operations by implementing hibernate interceptor. Most of the things work fine, however the problem is with logging composite objects.
And there are some related questions -
1. Hibernate interceptor enables me to log the class names, how do I get the corresponding table names ?
2. Consider a class -
Code:
Book {
  id,
  publisher,
  pages,
  cost,
  List<Author> authors.
  ....
  ....
}

When I make a call to session.save(book), it makes two insert queries on is in the Book table and the other one in the BookAuthormap table. The interceptor, seems to intercept only the save call for the book. I never get to intercept the save on BookAuthormap table.

How do I do that ? What is the standard practice of auditing database - ignore the map ?


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.