Budibase / budibase

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

Fix key value updates in patch #13876

Closed adrinr closed 4 weeks ago

adrinr commented 4 weeks ago

Description

Budibase's patch endpoint performs the patch operation and returns the updated row. We found an issue with composite keys (and affects patching any id value in SQL). When updating a value that affects the id, this value will be updated and we will try to get the latest row value, using the provided id. As this id just got updated, the fetch will always return undefined. For this, we are now recalculating the id based on the updated values, ensuring we use the up to date key.

Addresses

Launchcontrol

Fixing patch issues when updating values that are part of the identiy row

linear[bot] commented 4 weeks ago

BUDI-7422 Composite keys cause issues whenever trying to bulk delete records.