Jump to: navigation, search

Difference between revisions of "HowTo:Hard delete database records"


(Created page with "Since {{UBIK}} 4.3, it is possible to hard-delete records from the database to avoid it growing endlessly. <!-- DO NOT REMOVE THIS -->{{Template:HowTo/Begin}}<!-- DO NOT REMO...")
(No difference)

Revision as of 11:07, 11 April 2025

Since UBIK® 4.3, it is possible to hard-delete records from the database to avoid it growing endlessly.


[edit]

Instructions

  1. Delete objects regularly.
  2. Perform a hard-delete operation.

The hard-delete operation is available for programmatic customizing or execution via Who-Bert on the server side. A set of methods for hard-deleting objects from the database is now available in the IDataFactory interface:

bool HardDeleteRecords(MetaClass mc, DateTime? markedBefore = null);
bool HardDeleteRecords(MetaClass mc, List<Guid> idsToDelete);

E.g.:

environment.UBIKDataFactory().HardDeleteRecords(metaclass);

The overloads of the hard-delete method allow for removal of records that were marked as deleted before a given date, or from a range of specific IDs (again, of already deleted objects).