nocodb / nocodb

🔥 🔥 🔥 Open Source Airtable Alternative
https://nocodb.com
GNU Affero General Public License v3.0
44.48k stars 3.1k forks source link

🔦 Feature: Unable to update an updateable view #7692

Open dlutz2 opened 6 months ago

dlutz2 commented 6 months ago

Please confirm if bug report does NOT exist already ?

Steps to reproduce ?

In MySQL create a view which MySQL considers updateable ( https://dev.mysql.com/doc/refman/8.0/en/view-updatability.html) based on two underlying tables (each of which have a primary key defined). Content of the underlying tables can be edited through the view directly in SQL. Attempting to edit the view in NocoDB, results in a "Update not allowed for table which doesn't have primary key" (for text fields) or "Record update failed Cannot PATCH /api/v1/db/data/noco/..." (for Single Select fields)

Desired Behavior

Be able to update the contents of the underlying table via an updateable view.

Project Details

Node: v18.5.0 Arch: x64 Platform: win32 Docker: false RootDB: sqlite3 PackageVersion: 0.204.0

Attachments

No response

salim-b commented 2 months ago

Related to https://github.com/nocodb/nocodb/issues/7868#issuecomment-1999594708 (PostgreSQL)