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.76k stars 1.58k forks source link

Relationships get deleted when they should not (MariaDB) via Form #15047

Open phifogg opened 1 day ago

phifogg commented 1 day ago

Checklist

Hosting

Describe the bug I have created a data source pointing to my own mariaDB server. On that database I have created a bunch of tables. The relevant ones are:

So availability as a many to many relationship to coaches as well as to events. My idea is that I create a form with a list of events (done), when clicking on one of the events a side panel should show listing available coaches (done). When I now modify the events list to assign a coach to one event, it deletes all availablities for the selected event from the availability list. Actually... it is not completely deleting them, but emptying out the reference key from availability to event.

To Reproduce Steps to reproduce the behavior:

  1. Go to Data
  2. Open table availability
  3. Open view for_tests (filterting to one coach)
  4. Notice row with ID 83, it has no date in event column
  5. Update date to 2024-11-16
  6. Go to Design
  7. Go to Screen /current_season
  8. Preview
  9. Select row with event date 2024-11-16
  10. Notice on side panel bottom that 'Valerie Rupf' is listed
  11. On form above, change 'coach_orange' to any value
  12. Click Save
  13. Click the same record in table again to open side panel
  14. Notice 'Valerie Rupf' is not listed anymore

If you now check on the data table, the date column is cleared again.

Expected behavior The column event in the relationship table should not be cleared.

linear[bot] commented 1 day ago

BUDI-8857 Relationships get deleted when they should not (MariaDB) via Form

mike12345567 commented 6 hours ago

Hi @phifogg - we've tried to recreate the described issue and have been unsuccessful, would it be possible for you to provide a SQL schema for a table which experiences these issues? You can find information on how to do this through Budibase at: https://docs.budibase.com/docs/troubleshooting-sql

phifogg commented 1 hour ago

MySQL-dump.zip

Here you go.