Open GrantErickson opened 7 years ago
Doable now through custom behaviors: http://coalesce.readthedocs.io/en/latest/pages/modeling/model-components/behaviors/
Reopening now as it would be real cool to have this as a more built in feature.
Idea:
[Delete]
attribute has a new property that can be set to the name of field on the entity. This field is the entity's soft delete flag (can be a boolean, or any nullable like a DateTimeOffset?
).Spitballing more ideas
/list
, /count
endpoint defaults to non-deleted items only if no filter specified/get
endpoint defaults to ????? (TODO) - should it allow all items by default so that pulling up a "details" page of an old item automatically works (assuming that viewing soft delete items isn't restricted for the user).
Soft deletes are commonplace in many data scenarios. This can be done with Coalesce, but the build in functionality for deletes does an actual delete. It would be nice to be able to mark a class as using soft deletes which might expose functionality for this automatically. This could either replace the existing delete functionality or replace it and add a permanent delete as well.