-->
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: Event triggered even no SQL neccesary (no change at DB)
PostPosted: Thu Jan 10, 2008 6:25 am 
Beginner
Beginner

Joined: Mon Apr 02, 2007 8:08 am
Posts: 24
I connect listeners to events in order to make some table auditing. My problem is that after the merge() (or whatever operation I use) session is flushed and it triggers events for several objects. For example, if my session has 5 objects (connected with some cascades) I get several events triggered, even when only one of them is actually modified.

Hibernate won't trigger more SQL than neccesary, but at this point I don't know whether my event can distinguish modified objects, because it's important for me triggering auditing only at modified tables.

Is there something like ...willThisObjectTriggerSql(event.getObject())?

Thanks in advance!!

PD: I've posted this also to NHibernate forum by mistake, I'm sorry

_________________
--
<a href="http://ideasse.blogspot.com/">Ideas + Software Engineering</a> (English)
<a href="http://iiso.blogspot.com/">Ideas + IngenierĂ­a del Software</a> (Spanish)


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.