-->
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.  [ 3 posts ] 
Author Message
 Post subject: SessionImplementor
PostPosted: Thu Nov 25, 2004 2:22 pm 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
Hibernate version:2.1.7

Hi,
I've created an auditlog interceptor from the CaveatEmptor example (AuditLogInterceptor) that logs the old and new value of a field when this one has changed, this is called from the onFlushDirty method. To retrieve the dirty fields, I've used the TypeFactory.findDirty(...) method that does its job. My only problem is the SessionImplementor argument that I dont have , so I pass the null argument until I got a NPE when comparing 2 entities. The SessionImplementor is used to retrieve the indentifier of the entity and so can make a comparison.
How could I get this SessionImplementor from the interceptor (I have already a session ttached to the interceptor) ? Or is there another way than using the TypeFactory.findDirty(...)?
Thank you a lot for your great support.
Richard.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 25, 2004 5:13 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
don't mention i told you this but you should be able to cast a session to a sessionimplementor ..... (this is ofcourse not supported ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 26, 2004 2:32 am 
Regular
Regular

Joined: Tue Oct 07, 2003 1:13 pm
Posts: 70
Location: Paris, France
I promise that I will not repeat, that will remain a pure secret .... ;-)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.