Bug report #12899

Spatialite layer - impossible save edits with multiple selections field

Added by Darek Bobak over 6 years ago. Updated over 6 years ago.

Category:Data Provider/SpatiaLite
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:20989


When in field properties of spatialite layer I choose Value Relation for widget properties and allow multiple selections for the field (see attached screenshot) it is not possible to save edits, I'm receiving the following error:

Could not commit changes to layer sites_pts kopia
Errors: ERROR: 1 attribute value change(s) not applied.
  Provider errors:
      SQLite error: unrecognized token: "{" 

Here is the info of my QGIS configuration:

QGIS version 2.9.0-Master              QGIS code revision 7aae459
Compiled against Qt 4.8.5              Running against Qt 4.8.5
Compiled against GDAL/OGR 1.11.2       Running against GDAL/OGR 1.11.2
Compiled against GEOS 3.4.2-CAPI-1.8.2 Running against GEOS 3.4.2-CAPI-1.8.2 r3921
PostgreSQL Client Version 9.2.4        SpatiaLite Version 4.1.1
QWT Version 5.2.3                      PROJ.4 Version 480
QScintilla2 Version 2.7.2
This copy of QGIS writes debugging output.

Zrzut_ekranu_2015-06-06_19.38.35.png (22.2 KB) Darek Bobak, 2015-06-06 10:41 AM

sample_map.qgs (139 KB) Darek Bobak, 2015-06-07 12:33 AM

sites_db.sqlite (4.46 MB) Darek Bobak, 2015-06-07 12:33 AM


#1 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Feedback
  • Category set to Data Provider/SpatiaLite

I cannot confirm here. Maybe it depends on the data type of columns? Attaching a sample project/data would help a lot the troubleshooting.

#2 Updated by Darek Bobak over 6 years ago

Yes, indeed, when I've added a new layer (which source was the same as the problematic one), this new layer works as it expected. But the old layer (added some times ago, probably in the older version of QGIS) still does not allow to use multiple selections. I'm attaching project and the spatialite database. The problematic layer is "sites_pts_problem", the "sites_pts_ok" is a working one. The "tmp" field is the field with multiple selections and the table "dic_date_types" is a source of values.

#3 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Feedback to Open
  • Priority changed from Normal to Low
  • OS version deleted (8.1 64 bit Pro Polish)
  • Operating System deleted (Windows)
  • Target version set to Future Release - Lower Priority

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

  • Resolution set to invalid
  • Status changed from Open to Closed

INTEGER columns cannot contain multiple selections. Use text fields (like the tmp from the working layer).

Also available in: Atom PDF