> I hear you Dan, that is how I currently do it, just makes it messy. If I
> need to get a related collection through lazy loading I have to filter the
> children which adds more stink. .children().where(c => c.IsDeleted ==
> false) just gets a bit redundant. I was hoping to just specify when I DO
> want them since that happens in far fewer locations of the code.
why not use a radical different approach instead? -> instead of
having IsDeleted columns all over the place, create an 'archiving' catalog
for deleted data and use triggers which copy rows over to the archiving
catalog when you delete a row.
advantages:
- the working set in the application catalog/schema is not constantly
growing with data you can't see, but you only have the data which is valid
(i.e. 'not deleted')
- referential integrity constraints always work
- simpler code
'undeleting' data is simply a move back from the archiving catalog
to the real catalog. This takes custom code, however it's not a process
which will likely happen a lot, as 'soft-deletes' are mostly used for safety
precautions and not used as a way to undelete data on a massive scale (e.g.
re-activate a deleted user account).
FB
>
> Appreciate the suggestion,
> Ryan
>
> On Aug 13, 3:57 am, Dan B <[email protected]> wrote:
> > I handle IsDeleted filtering in my Repositories for this reason.
> >
> > On Aug 12, 4:50 pm, rhartzog <[email protected]> wrote:
> >
> >
> >
> > > Alright, thank you Jason.
> >
> > > On Aug 12, 10:40 am, Jason Meckley <[email protected]> wrote:
> >
> > > > I don't think you can override the where clause. if you need
> > > > conditional criteria i would go with explicit queries/criteria
> > > > objects or filters.
> >
> > > > On Aug 12, 10:49 am, rhartzog <[email protected]> wrote:
> >
> > > > > When using the where filter on the mapping file is it possible
> > > > > to override this? If I want to list the deleted entities to an
> > > > > admin so he/she can reactivate it. Is this possible? I saw
> > > > > comments from Gabriel in his soft delete post that say it is
> > > > > not, but that was from
> > > > > 2008 and thought I would see if anything has changed.
> >
> > > > > Thank you
>
> --
> 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.
--
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.