Thanks I think that's what we're going to go with. We're using Fluent NHibernate so I think we're going to sublclass some of the mapping generation code and add where clauses where applicable.
On Dec 10, 4:07 pm, "Ayende Rahien" <[email protected]> wrote: > Why not use a IsDeleted=true set in a listener > And then a where="Isdeleted=0" in the mapping? > > On Wed, Dec 10, 2008 at 6:05 PM, Will Shaver <[email protected]> wrote: > > If you figure out a slick way of doing this, please post it to the list as > > currently I'm doing soft delete in a very non-slick way. (using filters on > > objects and relationships in each mapping. Quite a pain.) > > > On Wed, Dec 10, 2008 at 2:54 AM, mattcole <[email protected]> wrote: > > >> Thanks Fabio and Will, > > >> I don't think that is doing exactly the same thing though. And, if > >> as Will states it doesn't work on Gets and Loads then it isn't really > >> what I'm after. I was more wondering if there are any extension > >> points similar to the DeleteEventListener that could be used on > >> retrieval, without having to specify it in the class mapping for each > >> class. I hadn't been able to find any, so I guess there isn't. > > >> Thanks, > >> Matt > > >> On Dec 9, 4:18 pm, "Will Shaver" <[email protected]> wrote: > >> > Important to note that filters don't work when doing a get() or load() > >> with > >> > an ID directly. > > >> > On Tue, Dec 9, 2008 at 6:13 AM, Fabio Maulo <[email protected]> > >> wrote: > >> > >http://nhforge.org/doc/nh/en/index.html#objectstate-filters > > >> > > 2008/12/9 mattcole <[email protected]> > > >> > >> Hi, > > >> > >> We are looking to implement soft deletion using NHibernate, and have > >> > >> managed to use the DefaultDeleteEventListener to implement soft > >> > >> deletion going into the database. What we were wondering though it > >> > >> it's possible at the same level to avoid retrieving entities that > >> have > >> > >> been marked as deleted. > > >> > >> We're using an interface called ISoftDeletable and checking whether > >> > >> the entity being deleted implements it, and if so instead update the > >> > >> record. > > >> > >> Is it possible to do something similar when querying entities? > > >> > >> Thanks, > >> > >> Matt > > >> > > -- > >> > > Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
