This is a migrated thread and some comments may be shown as answers.

Logical deletion in OpenAccess

1 Answer 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James Denning
Top achievements
Rank 1
James Denning asked on 08 May 2009, 02:12 PM
Hi there
Are there any recommended approaches for implementing logical deletion in a forward-mapped OpenAccess-based application? By this i mean the data is no longer visible to the ORM layer but is still within the database. Only current thinking I have come up with is to serialize the data to a database recycle bin table by handling the deleting event but this is far from ideal.
Regards
James Denning
PS OpenAccess is awesome btw :)

1 Answer, 1 is accepted

Sort by
0
Accepted
PetarP
Telerik team
answered on 11 May 2009, 02:19 PM
Hi James Denning,
on of the ways is to have an additional bool field to every table that will indicate whether the object is logically deleted or not and than filter on that field. However using this approach wont actually hide the objects because they would still be read from the database and than filtered. In addition things might get really complicated if there are deleted references as well.
The other possible approach is to have all the tables copied with a _deleted suffix and when ever the deleting event is fired the objects should be moved to the corresponding tables rather then being deleted.

Best wishes,
PetarP
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
James Denning
Top achievements
Rank 1
Answers by
PetarP
Telerik team
Share this question
or