Look in NHibernate Contrib \trunk\src\NHibernate.Burrow\src\NHibernate.Burrow.AppBlock\SoftDelete
You can set up cascades for all of your objects, and then set a delete flag in an interceptor or event handler. On Thu, Feb 5, 2009 at 8:24 AM, Robin Nadeau <[email protected]> wrote: > What about creating your own session object, that overloads the delete to > setting a deleted property to true? > > But I agree, this feature would be really nice. > > On Thu, Feb 5, 2009 at 11:21 AM, Bart Reyserhove < > [email protected]> wrote: > >> Hi group, >> In our application most of the entities are not really deleted. We put a >> deleted property on "true". >> Before deleting something checks need to happen to verify whether it is >> allowed to delete the entity. This can become a complex thing when entities >> are referenced a lot from other places in the domain model. It is also >> pretty dangerous because if you forget something in the check there will be >> no delete database constraint kicking in because nothing is really deleted. >> >> It would be really cool if this could be solved in some generic way based >> on the information NHibernate has on the associations. Does anyone have an >> idea whether this can be done and how I would best approach this? >> >> Thanks, >> >> Bart >> >> >> > > > -- > Robin Nadeau, B.Eng. > Software Developer > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
