Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeleteAsync behaves inconsistently #36

Open
achilles-portarinos opened this issue Nov 16, 2022 · 1 comment · May be fixed by #53
Open

DeleteAsync behaves inconsistently #36

achilles-portarinos opened this issue Nov 16, 2022 · 1 comment · May be fixed by #53
Assignees

Comments

@achilles-portarinos
Copy link

achilles-portarinos commented Nov 16, 2022

currently the behaviour for DeleteAsync is inconsistent,

Actual behaviour

  • DeleteAsync(id) does not throw whereas
  • DeleteAsync(id, partitionKey) throws.

Expected behaviour:

  • All precise DeleteAsync methods have the same behaviour when the entity under deletion is not found. The behaviour should be to throw, since it corresponds to a precise lookup.
  • DeleteAsync via predicate should not change behaviour, it should not throw, since it is an imprecise lookup. It can delete multiple entities or none. It should however return the number of items that get deleted.
  • The XML documentation of the IDatabaseRepository interface should be updated.
  • There will be no flag to control the throwing of exception on deletion. Precise deletions throw, imprecise do not throw.
@achilles-portarinos
Copy link
Author

During discussion, we identified that soft-delete is not fully implemented. The Issue description has been updated to reflect the expected behaviour.

@achilles-portarinos achilles-portarinos linked a pull request Nov 30, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant