This question is locked. New answers and comments are not allowed.
Hi,
I would know if Logical Delete support is in your future plans or if there is now a viable workaround to use OpenAccess in logical delete scenarios.
Best Regards
I would know if Logical Delete support is in your future plans or if there is now a viable workaround to use OpenAccess in logical delete scenarios.
Best Regards
3 Answers, 1 is accepted
0
Hi Andrea,
This has not been on our TO-DO list yet, but our team will evaluate it as a feature request and there is a possibility that we put it in our plans for the future. For now the only way to achieve logical delete is by handling the case by yourself. One of the workarounds is instead of deleting an object, one should just move it to another table. This operation can be done by subscribing to the deleting event and do the copy to the table where you would keep the deleted records there prior to the deletion.
Best wishes,
Zoran
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
This has not been on our TO-DO list yet, but our team will evaluate it as a feature request and there is a possibility that we put it in our plans for the future. For now the only way to achieve logical delete is by handling the case by yourself. One of the workarounds is instead of deleting an object, one should just move it to another table. This operation can be done by subscribing to the deleting event and do the copy to the table where you would keep the deleted records there prior to the deletion.
Best wishes,
Zoran
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jeremy Mann
Top achievements
Rank 1
answered on 22 Nov 2009, 10:16 PM
I'm also in Andrea's position. I need to logically delete items, but due to reporting dept constraints I cannot move the data to a different table.
How would I go about overriding the OpenAccess delete methods to just update my "IsActive" columns to false (preferably on a per object level). Thanks!
How would I go about overriding the OpenAccess delete methods to just update my "IsActive" columns to false (preferably on a per object level). Thanks!
0
IT-Als
Top achievements
Rank 1
answered on 23 Nov 2009, 08:10 AM
Hi Jerymy,
This is a "shot in the wild" but have you looked at the ITracking interface?
My idea was to opt in on the Removing or Removed event and in that handler first perform a refresh (Refresh method) of the persistent object and then write to the field you have for deciding whether this object is deleted (for example: a discontinued bool type field).
What I don't know is whether OA will stall on refreshing and changing the object while it is about to perform a delete and whether it just performs the delete anyway...
Another way (I have done so) is to let "business logic" decide whether it is an object that must not be removed and thus just marked as discontinued.
Regards
Henrik
This is a "shot in the wild" but have you looked at the ITracking interface?
My idea was to opt in on the Removing or Removed event and in that handler first perform a refresh (Refresh method) of the persistent object and then write to the field you have for deciding whether this object is deleted (for example: a discontinued bool type field).
What I don't know is whether OA will stall on refreshing and changing the object while it is about to perform a delete and whether it just performs the delete anyway...
Another way (I have done so) is to let "business logic" decide whether it is an object that must not be removed and thus just marked as discontinued.
Regards
Henrik