I have a problem with a selected table in a geopackage database. QGIS is preventing updates only, from happening on a particular table, in this database. QGIS is preventing editing of values, via the QGIS GUI's, on existing fields on this table.
I have a database called 'Design'. The table is called 'version'. This table is a non-geometry table. Attributes only.
I can toggle editing on the table. If i bring up the attribute table, or Form windows, the attribute fields are not editable. QGIS prevents the cursor from entering the field editing boxes and typing does nothing. Further to this, if I try to use the Field Calculator, the 'Update existing field' box is greyed out.
I can however, create a new record. (ie: Insert). I can insert records via various mechanisms.
Additionally, I can open the database in DB Browser, or SQLStudio applications, and edit the values of this table using those applications.
There are no non-standard triggers on this table (in fact, there are no update triggers, only insert and delete triggers).
The table does however, have a compound primary key. Two fields, are set as a primary key and are therefore, listed as a constraint in the dm software (SQLStudio as an example). The primary keys are fid and option_name.
I tested this by removing option_name as a primary key. Sure enough, editing capability was restored from within QGIS.
What I need to understand is, why does this primary key constraint prevent updates of other fields in QGIS? It does not prevent updates from within SQLStudio, so how does QGIS interpret this as a 'prevent all updates'.