-->
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: Soft Delete from db
PostPosted: Wed Jul 28, 2004 2:38 pm 
Hello,

I have a question about delete. We would like not to hard delete records in the db. We just need to mark records as inactive if we delete them. At DAO we can implement delete as update status=inactive. The question is in parent/child situation, how can we make child soft deleted also?

I am new to Hibernate, any help is appreciated.

Thanks.

Min


Top
  
 
 Post subject:
PostPosted: Wed Jul 28, 2004 3:19 pm 
Regular
Regular

Joined: Tue Oct 28, 2003 8:25 am
Posts: 72
Location: Belgium
You can try implementing the net.sf.hibernate.Lifecycle interface and coding the onDelete() method to do the update and return VETO.

I guess it should work but I haven't tested.


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.