Ticket T269498
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Deferred deletion removes references

XPO Soft-Delete without deleting relations

created 10 years ago

Hi,
Is it possible to keep references to related data, when I remove an object via soft-delete?
A customer deleted lots of entries that need to be restored, which is no problem as I just need to set GCRecord to null. But the relations are all lost! Is there a possibility to prevent that?

Answers approved by DevExpress Support

created 10 years ago (modified 4 years ago)

Hello Benjamin,

Please see possible ways to overcome this limitation here: Deferred deletion removes references. Let me know if you need further assistance.

Update:
As described in the How to: Restore Deleted Objects topic, the Deferred Deletion feature is not intended for object restoration, but for overcoming complex foreign index constraints at the database level. I have consulted with our developers, and we see a way to implement the functionality you are requesting through a custom IObjectLayer. See an example on the attachment. Feel free to test it and leave your feedback.

    Show previous comments (1)
    Anatol (DevExpress) 10 years ago

      Thank you for your feedback. We will definitely take it into account in the future. Currently, we do not have solutions other than the ones described in the Deferred deletion removes references ticket.

        Hi Anatol,
        I agree with Benjamin.  Seems the current XPO way of handling this leaves orphaned records, which is not good from a data integrity standpoint.  I understand it makes it simpler for the purgedeletedrecords logic as it then doesn't need to go in any specific order, but it seems it could figure out the associations by interrogating the persistent objects and work it's way up the hierarchy to delete in the right order and prevent and RI constraint errors.

        Anatol (DevExpress) 10 years ago

          As described in the How to: Restore Deleted Objects topic, the Deferred Deletion feature is not intended for object restoration, but for overcoming complex foreign index constraints at the database level. I have consulted with our developers, and we see a way to implement the functionality you are requesting through a custom IObjectLayer. See an example on the attachment. Feel free to test it and leave your feedback.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.