Yea I looked into that, unfortunately I need more information than I will have in an interceptor/listener.
-Ryan On Thu, Sep 18, 2008 at 07:12:31PM -0400, James Carman exclaimed: >You're probably better off setting up a Hibernate listener if you want >to do audit logging. Check out the Java Persistence with Hibernate >book for an example (if you have it). > >On Thu, Sep 18, 2008 at 6:51 PM, Ryan <[EMAIL PROTECTED]> wrote: >> I keep running into a similar issue and it comes down to me missing some >> fundamental knowledge of Hibernate, but I was hoping someone here could >> help point me in the right direction. >> >> Consider a Hibernate model called Child and it has a property called >> firstName. Now lets say I use a LoadableModel for the Child and tie >> firstName to a >> TextField via a property model. >> >> In Form.onSubmit I want to call some business logic classes and pass in >> the Child (so far no problem). Due to the OpenSessionInViewFilter and >> LoadableModel the current Hibernate session context has a persistent >> Child (that wicket has subsequently called setName on). In this code I >> want to be able to query out the Child object as it is in the DB and >> compare it to the modified, but uncommitted Child. >> >> We use this to either create an audit trail or show on the screen: >> "Child's First Name changed from X to Y". >> >> In this simple example I could keep track of this in Wicket, but its >> harder with more complex relationships. >> >> Is it possible with Hibernate to say give me the Child model from the DB >> and not the currently active instance that is tied to the session? >> >> Thanks, >> Ryan >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]