Bug report #16760

Relation reference widget: entries with a primary key of 0 initially display as a violation of the NOT NULL constraints

Added by Andreas Neumann almost 7 years ago. Updated over 6 years ago.

Category:Edit widget
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:24659


This concerns master (3.x):

Steps to reproduce:

Load any layer (layer A) that allows setting up a relation reference widget with another non-geometry layer

Load a second non-geometry layer (layer B) that has a primary key with integers and starts with zero

Make sure that the initial value before the form opens in layer A and the field of the relation reference widget is set to 0

Open the form of layer A - the form displays a violation of the NOT NULL constraint

Oddly, if one changes to a different value other than 0 and then back to 0, the violation of the NOT NULL constraint is gone

Associated revisions

Revision d299c687
Added by Matthias Kuhn over 6 years ago

Fix NULL vs 0 issue in relation reference widget

Fix #16760 https://issues.qgis.org/issues/16760


#1 Updated by Anonymous over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF