WanWizard / Datamapper

Maintenance of Datamapper has been transferred to https://github.com/saekort/datamapper in 2012.
27 stars 3 forks source link

Implement soft-delete functionality #9

Open WanWizard opened 12 years ago

WanWizard commented 12 years ago

In certain environments, regulations do not allow you to really delete any information.

To facilitate this, DataMapper needs an option to be able to mark records as deleted, and to "hide" these deleted records from every interaction you have with the database.

WanWizard commented 12 years ago

Note that this must be completely transparent for the application.

The column used in the table to mark the delete state should not be considered a valid column name from the applications point of view. You should not be able to select() it. It should be added as a where() filter to every interaction with every table that has this feature defined. If you set it (as an object property) it should be ignored when compiling SQL. It must be completely hidden.

WanWizard commented 12 years ago

Got a +1 from @ingdiaz and @tarciozemel