Skip to content

SQL many-to-many breaks when through table has composite primary key #4604

Description

@mjashanks

I have the tables

Customer
- customer_id : PK

Category
- category_id : PK

Customer_category
- customer_id
- category_id
PK = composite of the above 2

I have fetched the tables and setup the relationship in Budibase OK.

The relationship works when I am adding values to the relationships. I.e. checking more values in the relationship picker.

However, if I try and remove (uncheck values) - it does not save the removed values.

Now, if I add an id to my customer_category table and set it to the PK (as below) - then everything works.

- customer_id
- category_id
- id : PK

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions