-->
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: PostInsert Event
PostPosted: Tue Jan 03, 2006 5:00 pm 
Newbie

Joined: Tue Jan 03, 2006 12:22 pm
Posts: 1
I am trying to use the event listeners in Hibernate 3.1 to log insert activity. I have created my own listerner that implements the PostInsertEventListener Interface and mapped it to the "post-insert" and, after this didn't work, to the "post-commit-insert" event type in my hibernate_config file.

The problem is that the onPostInsert function of my listener implementation is being called by Hibernate even when the insert fails due, for example, to a UK constraint violation on the DB

Is this the expected behavior? The Javadoc for the PostInsertEventListener only says "Called after inserting an item in the datastore". But, this doesn't seem correct.

I assume I'm missing something here. Can anyone help?


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.