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 adding multiple many to one fields that point to the same related collection, the API will throw a 500 error and log:
Error: Introducing FOREIGN KEY constraint '<constraint_name>' on table 'singleton' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
This is because Directus defaults to ON DELETE SET NULL for new foreign keys, and MS SQL only supports adding one field with a foreign key constraint per related table.
To Reproduce
Add two many-to-one type fields related to the same collection.
Directus Version
v10.13.1
Hosting Strategy
Self-Hosted (Docker Image)
Database
MS SQL 2019 – 2024
The text was updated successfully, but these errors were encountered:
Describe the Bug
When adding multiple many to one fields that point to the same related collection, the API will throw a 500 error and log:
This is because Directus defaults to
ON DELETE SET NULL
for new foreign keys, and MS SQL only supports adding one field with a foreign key constraint per related table.To Reproduce
Add two many-to-one type fields related to the same collection.
Directus Version
v10.13.1
Hosting Strategy
Self-Hosted (Docker Image)
Database
MS SQL 2019 – 2024
The text was updated successfully, but these errors were encountered: