-->
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.  [ 2 posts ] 
Author Message
 Post subject: Logging deletions in Interceptor
PostPosted: Thu Dec 02, 2004 4:27 pm 
Newbie

Joined: Tue Nov 16, 2004 10:10 am
Posts: 2
This is a general question. We're using Hibernate 2.1.6. We're using an Interceptor to do logging and want to keep track of the values in a deleted object as they were at the time of deletion.

The values in the object can include some lazily initialized collections. We understand that it is illegal to initialize a collection from within the Interceptor. It's easy enough to check to see if these values are initialized, but it's unclear what to do if a collection is not already initialized.

We tried loading the entity from another Session object that we have on the same connection. Unfortunately, though the entity loaded from the Interceptor's local session was a different object, the collections within the local entity were references to the same collections in the original entity. So, accessing one of these collections is the same as initializing the original entity's collection.

Is there any way to do this?

Thanks,
Kealy & Kevin


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 03, 2004 11:48 am 
Beginner
Beginner

Joined: Fri Mar 26, 2004 8:19 am
Posts: 49
if you like, there's a pretty straightforward way to do this in Spring with an AOP logger. I can help if this is what you are doing. ...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.