|
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
|