Questions Softdelete function

Hello, I have several questions about the softdelete function:

1.- Is it possible to disable the softdelete function by some property? I would like it to be dynamic, obviously the fields delete_by and delete_ts will still exist in the tables even if the function has been disabled but nothing will be written to them.

2.- Is there any administrative function that allows deleting records that have been deleted from the application itself or must be done by hand ?, if there is a process that does it based on time, what is it and if you can modify this value?

3.- When creating an entity from Studio that inherits from StandardEntity, you could modify the check of softdelete by disabling it ?, since I may be interested in saving the fields of creation and modification but not of erasing.

Greetings and thanks.

Hi,

1.- Is it possible to disable the softdelete function by some property?

There is no property to disable soft deletion completely, but you can disable it for a current operation on different layers of your application:

  • For the current EntityManager using its setSoftDeletion() method

  • When loading data via DataManager using LoadContext.setSoftDeletion() method

  • For a collection datasource using the softDeletion=“false” XML attribute.

2.- Is there any administrative function that allows deleting records that have been deleted from the application itself or must be done by hand ?, if there is a process that does it based on time, what is it and if you can modify this value?

No, there is no such built-in procedure, but you can create your own and run it using Scheduled Tasks.

3.- When creating an entity from Studio that inherits from StandardEntity, you could modify the check of softdelete by disabling it ?

No, if you want to create a hard deleted entity, inherit it from BaseUuidEntity and just select all system interfaces except SoftDelete. All required attributes will be created and maintained automatically.

Thanks Konstantin.