You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you create a many-to-one relation to the current collection the relational trigger for "on delete" will be locked to "prevent deletion". This results in being unable to delete any item in this collection that has the relation set (or is being related to if the one to many was configured too).
To Reproduce
Create a recursive many-to-one relation to the same collection.
set up a few records who have this relation filled.
try to delete any of these items
Directus Version
10.6.3
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered:
Thank you for opening this issue! I'm facing exactly the same problem in my app. My feeds have comments, and those comments have replies, which are essentially also comments. As long as there are replies, a feed cannot be deleted. This means if a user in the app wants to delete their own feed, Directus throws an error. This is a significant issue, and because of it, we cannot go live at the moment. GDPR mandates that if a user wants their data to be deleted, it must be genuinely erased. Therefore, we can’t just set the status to unpublished and filter it on the frontend.
I hope this issue can be fixed without too much effort :)
@br41nslug The reason for that is that not all database support recursive relational constraints (notably MS SQL will error out if you try setting that).
I think we should close this in favor of #9507, which is all about implementing an app-side flow that will automatically find and help you delete related items that are preventing the deletion of the current item 🙂
Describe the Bug
When you create a many-to-one relation to the current collection the relational trigger for "on delete" will be locked to "prevent deletion". This results in being unable to delete any item in this collection that has the relation set (or is being related to if the one to many was configured too).
To Reproduce
Create a recursive many-to-one relation to the same collection.
set up a few records who have this relation filled.
try to delete any of these items
Directus Version
10.6.3
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered: