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

False error notification when saving change to parent table #14940

Open emeany opened 3 weeks ago

emeany commented 3 weeks ago

Checklist

Hosting Cloud

Describe the bug When using the 'Save Row' action to update the fields of parent record, an error message is generated (although the record appears to get updated).

The error says 'Null value not allowed for a column'.

If, I duplicate the offending postgres table, and bring it into budibase WITHOUT creating a relationship, I am able to update the record without any errors.

To Reproduce

  1. create 2 tables, 1 parent, 1 child, and populate each with 1 row CREATE TABLE parenttable ( id bigserial NOT NULL, oname text NULL, CONSTRAINT parenttable_pkey PRIMARY KEY (id) );

CREATE TABLE childtable ( id bigserial NOT NULL, parentid bigint NOT NULL, oname text NULL, CONSTRAINT childtable_pkey PRIMARY KEY (id), CONSTRAINT childs_parent_fk FOREIGN KEY (parentid) REFERENCES parenttable(id) );

2. define budibase relationship:

image

3. create an update page for 'parenttable'

image

4. preview in fullscreen, make an edit to the form, and attempt to save - the error appears, but the data is saved without issue:

image

5. delete the previously defined budibase relationship and again attempt to edit/save the form - row is saved without error notification:

image

Expected behavior The record should be saved/updated without error notification.

linear[bot] commented 3 weeks ago

BUDI-8813 False error notification when saving change to parent table

emeany commented 3 weeks ago

Some additional info:

I am also unable to make edits to the tables directly within the data tab (the column IS nullable, in budibase and postgres):

image

I AM able to create a NEW row however, and subsequent edits to this new row DO NOT throw an error.

The error only exists when editing records with a 'child' record.

also note that I am unable to 'break' the existing relationships from within the data tab (I receive the same error)

emeany commented 3 weeks ago

I was able to find a 500 error related to the 'child' table (interests):

image
emeany commented 2 weeks ago

Please let me know if there is any way I can assist!