[QGIS-Developer] Fwd: [Qgis-user] Error editing PK values in "Add record" form

Andreas Neumann a.neumann at carto.net
Wed Mar 7 23:56:30 PST 2018


Hi, 

I am forwarding this from the user list - if this is really the case
that multi-column primary keys are violating the unique constraints of
"individual" fields, than I need we need to properly deal with such
cases. 

Multi-column pkeys are quite common in some data models. 

Any ideas how to fix/address this issue? 

Thanks, 

Andreas 

-------- Original Message -------- 

 		SUBJECT:
 		[Qgis-user] Error editing PK values in "Add record" form

 		DATE:
 		2018-03-08 08:31

 		FROM:
 		Rafa García Castillo <ragaca at gmail.com>

 		TO:
 		qgis-user at lists.osgeo.org

  Hi everybody, 

  I´m testing QGIS 3.0 in Windows 10. I think I have found an error in
the "Add record" form when you are editing a PostgreSQL table without
geometry and the table primary key (PK) is composed of two fields (or
more) from the table. 

  I suppose QGIS thinks a PK field has to be unique, and that´s true for
most of the cases, but when you have a PK composed of more than one
field, is the combination of these fields what it has to be unique, not
the fields individually. Now, in QGIS 3.0, if you write a value for one
of the PK fields that it is already in the table, it doesn't let you
insert that value, even if the combination of the values that compound
the PK is unique. 

  I attach two screenshot:  
    -"Add record" button 
    -"Add record" form not letting you insert a value 

  Thanks in advance 

  Rafa 

_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180308/117c9f37/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_record_button.jpg
Type: image/jpeg
Size: 1341 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180308/117c9f37/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_record_form.jpg
Type: image/jpeg
Size: 17309 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180308/117c9f37/attachment-0003.jpg>
-------------- next part --------------
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


More information about the QGIS-Developer mailing list