Bug report #14575

attribute table errors when spatialite primary key is text

Added by Josef Källgården over 4 years ago. Updated over 4 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Data Provider/SpatiaLite
Affected QGIS version:2.14.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22548

Description

The attribute table is filled with "ERROR" for any spatialite layer having primary key of type text.
The problem is only affecting the attribute table, not db manager.
The problem is also only affecting spatialite layers with primary key of type text, not when using integer for pk.

See attached sample database and screen dumps.

(qgis 2.14.0 and 2.14.1 also crashes frequently when working with spatialite layers, e.g. when selecting features, but I do not know if it is related to the text primary keys)

pk_text_or_integer.sqlite - sample db (129 KB) Josef Källgården, 2016-03-27 02:36 PM

attribute_table_while_editing.png - attribute table while editing (60.1 KB) Josef Källgården, 2016-03-27 02:36 PM

attribute_table_and_db_manager_after_saving_edits.png - attribute table after saving edits (57.8 KB) Josef Källgården, 2016-03-27 02:36 PM


Related issues

Related to QGIS Application - Bug report #14626: SpatiaLite layer not displaying in QGIS 2.14, works ok in... Closed 2016-04-07
Duplicated by QGIS Application - Bug report #14999: Spatialite provider does not support alphanumeric primary... Closed 2016-06-10

Associated revisions

Revision 10501745
Added by Jürgen Fischer over 4 years ago

spatialite provider: prefer rowid as primary key where available (and some cleanups)

fixes #14575, fixes #14626

Revision 69e3c6f7
Added by Even Rouault over 4 years ago

[Spatialite provider] prefer rowid as primary key where available

Adapted from 1050174532627ae44c4467e9911c1fca41e138e3 without the cleanups.

fixes #14575, fixes #14626, fixes #14999

History

#1 Updated by Giovanni Manghi over 4 years ago

  • OS version deleted (17.2)
  • Operating System deleted (linux mint)
  • Target version changed from Version 2.14 to Version 2.16

#2 Updated by Giovanni Manghi over 4 years ago

  • Affected QGIS version changed from 2.14.0 to 2.14.1

#3 Updated by Jürgen Fischer over 4 years ago

  • Status changed from Open to Closed

#4 Updated by Even Rouault over 4 years ago

  • Target version changed from Version 2.16 to Version 2.14

Backported to 2.14

Also available in: Atom PDF