Bug report #16785
Constraint prevent adding feature to spatialite layer with auto-increment pkey
|Affected QGIS version:||master||Regression?:||Yes|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24684|
1. Create a spatialite layer with an auto-incrementing primary key
2. Turn editing on
3. Add feature
=> the pkuid field is invalid with a NULL value but you cannot edit it.
#4 Updated by Darek Bobak over 3 years ago
- File field_properties.png added
Did you try to manually write something in the pkuid field? And check, if the field properties allow edition of the field (see attached image).
In the meantime, I've found the way to make QGIS automatically fill that field with increment value. You have to insert and expression:
in the "Default value" field in the properties of the field.
#9 Updated by Giovanni Manghi over 3 years ago
- Status changed from Feedback to Open
Denis Rouzaud wrote:
But why feedback? For me it's a serious blocker.
the status does not indicates the seriousness: feedback just means that the ticket is open and a question awaiting an answer has been posted. Seriousness is give by the priority field, and by the "regression" field.