1
Collections with self referencing relationships cannot be removed
Source: directus/directus#24894 · opened by @rlora
Describe the Bug We have a basic use case that we're currently implementing with a workaround, but we couldn't find a clear reference whether this is currently supported in Directus or not. We have a pages collection that represents pages in a website. A page can either be a root page or have an optional parent. This allow us to model a hierarchical structure where we can display menus and submenus. Most of the model works as expected but the collection cannot be removed without removing the relation field first. Also we cannot configure the behavior "SET NULL" to the relationship. The model is as follows (simplified): • pages - id (pk) - title (required, string) - parent (optional, string, self-referencing) Some sample data: To Reproduce Create a collection as the one described in above. Try to delete the collection. Errors Shown The remove action fails with the following error in the Directus console. ![Screen Shot 2022-06…
No pledges yet. Be the first to back this.
Comments
Similar requests
Restrict "Show Hidden Collections" to Admin Users
25 votes · 0 comments
"Expand" Option for Relationships Between Collections
1 vote · 0 comments
Grant permissions on all user collections
1 vote · 0 comments
Access Policy for Data Model / Content Collection Groups (Folders)
2 votes · 0 comments
Get all related collections/items for m2o,m2m without reverse fields
2 votes · 0 comments
No comments yet.