220.127.116.11.1. Use of Soft Deletion
To support soft deletion, the entity class should implement
SoftDelete interface, and the corresponding database table should contain the following columns:
DELETE_TS– when the record was deleted.
DELETED_BY– the login of the user who deleted the record.
The default behavior for instances implementing
SoftDelete interface, is that soft deleted entities are not returned by queries or search by id. If required, this behavior can by dynamically turned off using the following methods:
setSoftDeletion(false)for the current EntityManager instance.
LoadContextobject when requesting data via DataManager.
In soft deletion mode, the platform automatically filters out the deleted instances when loading by identifier and when using JPQL queries, as well as the deleted elements of the related entities in collection attributes. However, related entities in single-value (*ToOne) attributes are loaded, regardless of whether the related instance was deleted or not.