Brendan
Brendan

Reputation: 581

orchard cms removing/deleting content items

Just curious as to the thinking behind why when a content item is deleted from orchard all associated database records remain? This goes for any content type and associated parts. Seems a little wasteful to me? I understand I can use the ContentHandler class to tap into OnRemoved and remove ContentPartRecords myself. I just can't see how it makes sense say if I delete a content item that it leaves the RoutePartRecord in the database.

Upvotes: 3

Views: 2928

Answers (1)

Piotr Szmyd
Piotr Szmyd

Reputation: 13366

The logic behind such behavior is that keeping the removed records and flagging them as removed is better than removing them completely. Why?

  1. They can be undeleted
  2. Keeping the whole history is useful for tracking changes and is also a must-have in many scenarios (for legal reasons).

And also - storage space is extremely cheap these days.

You can also check the discussion about exactly the same problem on Codeplex.

Upvotes: 2

Related Questions