-->
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: If ILifecycle is deprecated, how to cancel a deletion?
PostPosted: Tue May 29, 2007 10:27 am 
Newbie

Joined: Fri May 18, 2007 1:41 pm
Posts: 8
If ILifecycle is deprecated, what is considered the best way to update an object to set a flag instead of deleting it?

With ILifecycle, I could just use :
Code:
      public LifecycleVeto OnDelete( ISession s ) {
         // Deactivate the object.
         this.IsActive = false;
         // Cancel the deletion.  Let the object be updated with the new IsActive value instead.
         return LifecycleVeto.Veto;
      }

IInterceptor's OnDelete doesn't seem to suit my needs since 1) the comments say "It is not recommended that the interceptor modify the state" and 2) there doesn't seem to be a way to cancel the deletion in that method.


Top
 Profile  
 
 Post subject: Figure this out?
PostPosted: Fri Jan 18, 2008 8:56 pm 
Newbie

Joined: Fri Jan 18, 2008 7:45 pm
Posts: 18
Location: Eugene, OR
Did you ever get an answer to this question?

_________________
Woil / Will Shaver / http://primedigit.com/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 22, 2008 2:03 pm 
Newbie

Joined: Fri May 18, 2007 1:41 pm
Posts: 8
No, so I'm still using LifecycleVeto from NHibernate.Classic.


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.