Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
[x] I have searched budibase discussions and github issues to check if my issue already exists
Hosting
Self
Method: docker compose
Budibase Version: 2.29.29
App Version: 2.29.29
Describe the bug
After creating a many to many relationship between 2 MS SQL tables that have primary keys with spaces in their names. Once you try to relate records you will constantly get hit with: The INSERT statement conflicted with the FOREIGN KEY constraint.. This error isn't really helpful. The issue lies with the spaces in the column names. If i alter the primary key names + FOREIGN key names in the bridge table and re-try everything works.
To Reproduce
Steps to reproduce the behavior:
Create 3 tables using the sql create script below
Fetch these tables in Budibase
Try and change one of the relationships in the data area
See error
Expected behavior
You should be allowed to related records through Budibase with foreign key columns that have spaces in the names. Alternatively a better error may need thrown, as the error suggests that the rows you are trying to link don't exist. Which i guess is correct depending on how the query is built.
Checklist
Hosting
Describe the bug After creating a many to many relationship between 2 MS SQL tables that have primary keys with spaces in their names. Once you try to relate records you will constantly get hit with:
The INSERT statement conflicted with the FOREIGN KEY constraint.
. This error isn't really helpful. The issue lies with the spaces in the column names. If i alter the primary key names + FOREIGN key names in the bridge table and re-try everything works.To Reproduce Steps to reproduce the behavior:
Expected behavior You should be allowed to related records through Budibase with foreign key columns that have spaces in the names. Alternatively a better error may need thrown, as the error suggests that the rows you are trying to link don't exist. Which i guess is correct depending on how the query is built.
Create scripts