woensdag 14 november 2007

Soft delete records, some kind of trash...

Mariano Iglesias wrote an article on the Bakery about Soft deleting records in CakePHP.

When you use soft delete behaviour of your models you don't actually delete records, but give them some kind of 'deleted' state. You can use this as a sort of Archive. Suppose you have many customers, but a lot of them are not active customers anymore (not good man, keep selling). You can give them a soft delete tag to have your front end only show active customers. You can have a special archive to still view the records containing information on old customers. And, they can become active again without having to fill all dat again.

Read the article at the Bakery

Geen opmerkingen:

Een reactie posten