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.  [ 1 post ] 
Author Message
 Post subject: FlushMode changes in the midst of a session
PostPosted: Mon Apr 09, 2007 7:59 pm 
Newbie

Joined: Sat Apr 07, 2007 8:02 pm
Posts: 4
I need to do some validation after an entity has its properties updated but before it is flushed to disk. The validation requires a select against the database. In order to make sure the entity is not saved before the validation occurs, I want to change the FlushMode to never before the validation and then back to auto right after the validation completes. This seems to work but I was wondering if there are any unintended side-effects of doing this. I guess I could evict the entity from the session and then reattach it, but it would seem the flushmode is less costly.

So, any consequences I should be aware of?


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

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.