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

[BUG]: Implement deleting objects in new API that have foreignkey constraints #1157

Open
jessevz opened this issue Dec 10, 2024 · 0 comments
Labels
bug Something isn't working enhancement Enhancement of existing features / Small addition server Hashtopolis API/Server related

Comments

@jessevz
Copy link
Contributor

jessevz commented Dec 10, 2024

Version Information

0.14.3

Hashcat

No response

Description

Currently it is not possible to delete objects in the new API, that have foreignkey constraints. For example, in a hash the foreingkey to hashlist can't be null, but deleting a hashlist doesn't cascade to hash. This means that currently hashlist cant be deleted.

There are 2 possible solutions for this:

  1. Either implement [ENHANCEMENT]: Changing database to cascading deletes #1119 to cascade deletes in the database layer.
  2. The other solution is to add more logic in the deleteObject() function where this is needed. This is also the solution that was used in the old API.

Personally I have a slight preference for solution 1, because this requires less additional logic that has to be written. The con of this solution could be that when you for example accidently delete a hashlist in the DB you also lose your hashes, which can be quite problematic.

@jessevz jessevz added bug Something isn't working enhancement Enhancement of existing features / Small addition server Hashtopolis API/Server related labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Enhancement of existing features / Small addition server Hashtopolis API/Server related
Projects
None yet
Development

No branches or pull requests

1 participant