I was just thinking about that approach as well. Do you also have a get() in an abstract Gateway that uses the deleted flag to ensure that soft-deleted records are not returned when the app tries to get() them? What about for listings? Do you have some abstract code that ensures that the deleted flag is respected, or does it need to be "remembered" for any queries that are written? Or maybe you use a view?
Cheers, Bob On Wed, Jan 28, 2009 at 8:50 AM, Brian Kotek <[email protected]> wrote: > I just override my default delete() method within objects that require soft > deletes, which triggers an update instead to set the deleted flag to true > and ensures that the object is purged from the cache. It seems to work > pretty well since nothing outside the object knows that calling delete() on > it is actually doing a soft delete. > > On Wed, Jan 28, 2009 at 8:07 AM, Nando <[email protected]> wrote: >> >> I don't find that small snippet of code difficult to read, but that's just >> me. It could be encapsulated in a doSoftDelete controller method for >> clarity, or in your decorator if you're going that route already. >> >> But to be clear, I DO get confused reading code blocks sometimes, even my >> own, but especially other's code sometimes confuses the heck out of me! ;-) > > > > > -- Bob Silverberg www.silverwareconsulting.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" 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/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
