Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

DeferredDeletionAttribute Class

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = true)]
public sealed class DeferredDeletionAttribute :
    Attribute

Remarks

Deferred deletion means that when you delete a persistent object by calling its XPBaseObject.Delete method, XPO does not physically delete the record in the underlying data store. Instead, it marks the record as deleted.

For detailed information, see Deleting Persistent Objects.

Note

  • When an object with Deferred Deletion enabled is deleted, it is removed from associated collections. Associations cannot be recreated automatically when you restore a deleted object. This behavior is by design, because the Deferred Deletion feature is not intended for object restoration, but for overcoming complex foreign index constraints at the database level.

  • This attribute affects service member generation (see When and Why XPO Extends the Database Schema). If it needs to be applied to a dynamically created class, pass this attribute in the XPDictionary.CreateClass method arguments instead of adding it afterwards.

Inheritance

Object
Attribute
DeferredDeletionAttribute
See Also