Bug report #11265
0 used instead of NULL
|Affected QGIS version:||2.4.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||19564|
We just moved back to version 2.2 because we have problems with the digitising of PostGIS-Layer with an integer foreign key. The foreign key has no "not null"-constraint. When we edit it and leave it empty the following message pops up:
PostGIS error while changing attributes: ERROR: insert or update on table "layer" violates foreign key constraint "fk_layer_group"
DETAIL: Key (fk_layer_group=(0) is not present in table "layer_group".
I guess its a bug with the null values for the attributes.
#1 Updated by Matthias Kuhn almost 6 years ago
- Status changed from Open to Feedback
- Which editor widget is configured for the field (vector layer properties /fields tab)?
- How are you editing the attribute? (Feature form, attribute table...)
Some similar bugs have recently been fixed, so this may already be solved in current master. It would be great if you could verify on the latest nightly releases if this is still an issue so it can be resolved for 2.6.