Open racke opened 9 years ago
Also it is a bug - if you have a foreign key in the table which can be NULL but the column isn't included in form columns, you get sth like that:
request to POST /api/Category crashed: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: insert or update on table "categories" violates foreign key constraint "categories_supplier_fkey"
DETAIL: Key (supplier)=() is not present in table "vendors"
Grega, how can we limit the item update to form columns only?
Dropdown is safest but not always ok. Autocomplete doesn't restrict it, but there may be a way to ensure only suggested items have been selected. I don't have time right now to look into details.
I'm working on a patch.
This patch should be good, though it is possible we get regressions. It is definitely the right way to do.