-->
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: findDirty in combination with OnFlushDirty
PostPosted: Mon Mar 27, 2006 5:49 am 
Beginner
Beginner

Joined: Mon Nov 08, 2004 11:58 am
Posts: 29
I've two interceptors that are chained. The first determines whether or not an object is dirty (findDirty). The second one updates a specific field in all dirty objects (OnFlushDirty).

The problem is that the dirty check itself does not mark the field updated by the second one as dirty. As Hibernate does not recheck in this case, the changed field from the second interceptor never goes to the database.

The question now is, if that is by design and I'm doing something wrong or should hibernate be improved here, which would be my opinion.

The problematic code is: DefaultFlushEntityEventListener.handleInterception.

it only recalculates if the dirty check is not performed by a Handler..


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 29, 2006 4:22 am 
Newbie

Joined: Thu Oct 27, 2005 6:53 am
Posts: 3
Hi mkopp,
I've got the same problem. I believe that dirty state computation should be re-triggered even if it is intercepted.

As a "quick and dirty" workaround, I've implemented the onFlushDirty interception in the findDirty interception whenever I detect that my entity is dirty...

I don't know if we might file a bug on this one.

Hope this helps

_________________
Vince


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.