.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
A newer version of this page is available. Switch to the current version.

DeferredDeletionAttribute Class

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = true)]
public sealed class DeferredDeletionAttribute :
    Attribute
<AttributeUsage(AttributeTargets.Class Or AttributeTargets.Interface, Inherited:=True)>
Public NotInheritable Class DeferredDeletionAttribute
    Inherits 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

See Also