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: DefaultPreInsertEventListener doesn't seem to work?
PostPosted: Thu Jun 22, 2006 2:18 pm 
Beginner
Beginner

Joined: Wed Apr 05, 2006 8:16 pm
Posts: 20
I'm not using the DefaultPreInsertEventListener correctly I think :[

We have hooked pre-insert events by extending the DefaultPreInsertEventListener. We are successfully entering the onPreInsert(event) method, and our logs show that our audit trail data (last updater, last update date) are being stamped to our entity *before* we see the "insert" statement show up in the sql output. This is like it should be.

We are logging hibernate output, and the pre-insert listener fires and modifies our object before hibernate binds the parameters to the insert statement, as we would expect.

But then, when hibernate finally binds the parameters and builds the insert sql, it acts as if it had skipped the listener completely and our audit fields are still null. Is there some trick to PreInsertEventListeners? I think we are using ours wrong. Thanks!,

Jim


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.