Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.79k stars 1.58k forks source link

Support setting multiple many to many relationships between two tables #14966

Closed adrinr closed 3 weeks ago

adrinr commented 3 weeks ago

Description

We currently support multiple many-to-many between the same tables, but the the frontend does not properly support it. This PR is updating the "define relationship" modal to support this config, moving the error message to a clearer field. Also, adding an extra check to make sure that the same column is not used as both foreign keys on a join table, and fixing the initial type load on existing relationships.

Addresses

Screenshots

Current settings

image

Can add new relationships between people -> tasks

image

Cannot reuse the same through and foreign keys (whatever the order)

image image

Cannot set both foreign keys to the same column

image

Launchcontrol

Support configuring multiple many-to-many between the same tables

linear[bot] commented 3 weeks ago

BUDI-8746 Multiple Many-to-Many relationships between two tables

qa-wolf[bot] commented 3 weeks ago

QA Wolf here! As you write new code it's important that your test coverage is keeping up. Click here to request test coverage for this PR!