SQL has always had a great feature: cascading deletes. You plan it in advance and when it's time to delete something, BAM! No need to worry about all those dependent records.
However, nowadays it's almost taboo to actually DELETE anything. You flag it as deleted and stop showing it. Unfortunately, I haven't been able to find a solid sol...
Hello,
I'm using the following setup to implement soft deletes in Django. I'm not very familiar with Django under the hood so I'd appreciate any feedback on gotchas I might encounter. I'm particular uncomfortable subclassing a QuerySet.
The basic idea is that the first call to delete on a MyModel changes MyModel's date_deleted to t...
I have a database where most tables have a delete flag for the tables. So the system soft deletes items (so they are no longer accessible unless by admins for example)
What worries me is in a few years, when the tables are much larger, is that the overall speed of the system is going to be reduced.
What can I do to counteract effects l...
I have a table in MySQL dB that records when a person clicks on certain navigation tabs. Each time it will soft-delete the last entry and insert a new one. The reason for soft-delete is for analytics purposes, so I can track over time where/when/what users are clicking. The ratio of soft-deletes to new entries are 9:1, and the table size...
I try to make a soft delete by implementing the DeleteEvent Listener
public class MyDeleteEventListener : DefaultDeleteEventListener
{
protected override void DeleteEntity(IEventSource session, object entity,
EntityEntry entityEntry, bool isCascadeDeleteEnabled,
IEntityPersister persister, ISet transientEntities)
{
...
I have overridden the default NHibernate DefaultDeleteEventListener according to this source: http://nhforge.org/blogs/nhibernate/archive/2008/09/06/soft-deletes.aspx
so I have
protected override void DeleteEntity(
IEventSource session,
object entity,
EntityEntry entityEntry,
bool isCascadeDeleteEnable...
I'm working with a database where the designers decided to mark every table with a IsHistorical bit column. There is no consideration for proper modeling and there is no way I can change the schema.
This is causing some friction when developing CRUD screens that interact with navigation properties. I cannot simply take a Product and t...
Hi,
I am soft-deleting objects in a MySQL database and using the Propel ORM. I have gotten soft-deleting to work, but at the cost of losing my enforced parent-child relationships, since the actual rows are not being deleted.
Is there any way for Propel to know that a record has been soft-deleted when you access it, so that a null-refe...
I have custom objects which implement INotifyProperyChanged and now I'm wondering if it is possible to implement soft delete which would play nicely with binding? Each object would have a IsDeleted property and if this property would be set to true than it would not be displayed in GUI. I was thinking about making a custom markup extensi...
Hello everyone,
I'm using soft deleting in my database (IsDeleted field). I'm actively using LoadWith and AssociateWith methods to retrieve and filter nested records.
The thing is AssociateWith only works with properties that represents a one-to-many relationship.
DataLoadOptions loadOptions = new DataLoadOptions();
loadOption.LoadWi...
Nearly every table in our database has a FK to the Auditing table which logs created, updated and deleted status (date and username).
We mapped the auditing table to the Auditing class and use it like this:
@MappedSuperclass
public class BusinessObject extends DataObject {
private static final long serialVersionUID = -114781101039594...