DeleteFilter Addition

I would like to add a delete filter to ORM Lite for a few use cases that we have and perhaps others. Before I do, is this something that you had looked at prior but rejected, didn’t have time for, or is this functionality that we can push a pull request for? The following I’d like to do:

  • DeleteFilter in config
  • Config option for querying the deleted object and passing it to the filter (if true this would encompass a query first before deleting so the deleted object would be passed into the filter)
  • Update the deletebyid and delete methods that take an object (no anon types) to call the filter if defined and do the initial query if the config is set.

Thoughts? In general this is to support an audit log of data which can be done via the insert/update filters but there is no delete filter currently.

1 Like

Sure we can accept a PR for this but it’d need to remain backwards-compatible and minimally disruptive, so you can add overloads but not modify/break existing APIs.

Thanks & understood. I’ll try to get the PR done next week.