Orchard cms 删除/删除内容项
只是好奇为什么当内容项从果园中删除时,所有关联的数据库记录仍然存在?这适用于任何内容类型和相关部分。我觉得有点浪费?我知道我可以使用 ContentHandler 类来利用 OnRemoved 并自行删除 ContentPartRecords。我只是不明白如果我删除一个内容项,它会将 RoutePartRecord 留在数据库中,这有什么意义。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这种行为背后的逻辑是,保留已删除的记录并将其标记为已删除比完全删除它们更好。为什么?
而且现在存储空间非常便宜。
您还可以在 Codeplex 上查看关于完全相同问题的讨论。
The logic behind such behavior is that keeping the removed records and flagging them as removed is better than removing them completely. Why?
And also - storage space is extremely cheap these days.
You can also check the discussion about exactly the same problem on Codeplex.