-->
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: @NotFound(action = NotFoundAction.LOG)
PostPosted: Fri Sep 17, 2010 2:15 am 
Newbie

Joined: Mon Jul 12, 2010 5:41 am
Posts: 6
We have an application which contains some dirty data where foreign keys are defined with the value 0 instead of null when there should be no connection. Most of it has been corrected now, but we are not sure everything is corrected, and the data might be updated by external applications later on.

We are currently using NotFoundAction.IGNORE to give an empty reference in the entity if no connection is found. The problem with this approach is that we are never notified when Hibernate meets dirty data. Using NotFoundAction.EXCEPTION reports dirty data, but it also crashes the current request.

What I was thinking, was that it would be nice to have a third option for the NotFound annotation that sets the value in the entity to a null, but logs the error.


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.