-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Constraint violation on many to many join table #8882
Comments
Found the source of this issue - the joining table here is relatively poorly defined, the issue is that the CREATE TABLE IF NOT EXISTS public."jt_employee_skills_Skills_employee"
(
employee_id integer NOT NULL,
skills_id integer NOT NULL,
CONSTRAINT fkEmployeeId FOREIGN KEY(employee_id) REFERENCES Employee(id),
CONSTRAINT fkSkillId FOREIGN KEY(skills_id) REFERENCES Skills(id),
PRIMARY KEY (employee_id, skills_id)
)
WITH (
OIDS = FALSE
) This is the type of junction table that Budibase is designed to handle, auto-generating not null primary key fields, of any type, could be very difficult as the |
…ng an issue with many to many updating correctly.
I tried the same thing but still, it's not working. So basically I want to remove skills using budibase design and update the employee records. The employee records are getting updated and the new skills are also being added to the DB. The problem is that when I try to remove skills, it shows removed in the form UI, but the same is not updated in the database. Please let me know if you want screenshots, schema, or anything else for your reference. |
Hi @pankajjangid05 - there was another underlying issue which I've fixed in my PR - this will be released in the next Budibase update. |
I checked the new release, but it is not working for me as expected, If you have any idea what could be the other way to do this Please let me know. |
Hi @pankajjangid05 - this has not yet been released - it will be part of our main release which should occur sometime around next week. It will be in version |
Hosting
Describe the bug
Consider the following setup: Many employees -> Many skills
Two employees have many skills. Some overlap, some don't.
Try to change an employees skills through an auto-generated screen will result in constraint violation on the join table.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Remove 'Docker' and save
SQL Scripts
The text was updated successfully, but these errors were encountered: