>> I guess this question is familiar to many of you and since I came
>> across it for the first time now I'm soliciting best practice and
>> strategy advice.
>>
>> I have a set of tables with all sorts of relationships between them.
>> Many times items get deleted, but I'd like to make sure that I can
>> undo a delete later (not in the same session, but let's say a week
>> from the delete). Is there an obvious one way to do this?
>>
>> What I thought about is creating new tables for each already existing
>> table, something like deleted_zoo for zoo, deleted_animal for animal,
>> etc. Then when I delete something from zoo (which cascades down to
>> animal) I would override the appropriate method that would not only
>> delete the item from the table but would also insert it into the new
>> deleted_XXX tables. Then I could copy back from the deleted_XXX table
>> to the original XXX table if I want or I can delete it from there
>> permanently.
>>
>> How would you guys approach this problem?
>
> Some time ago I read about this same problem here
>
> http://jtauber.com/blog/2008/12/19/marking_for_deletion_in_django/
>
> Maybe you can get some ideas from that blog entry.

Thanks Markus, this was indeed useful.
Actually, this blog entry outlined the exact same 2 ideas I had in my
post, plus a third option. I think I will go with the
duplicate-every-table method, but if others have more input I'd be
happy to hear them.

Cheers,
Daniel


-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to