Bug report #15173

Editable View - save edit in attribute table throw error

Added by Jakub Kosik over 8 years ago. Updated over 7 years ago.

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

Description

In spatialite editable view (INSTEAD OF triggers), save edits working fine from digitising toolbar, not working in attribute table. After save in attribute table, save from toolbar trhow error too.

History

#1 Updated by Matthias Kuhn over 8 years ago

  • Status changed from Open to Feedback

What's the error?

#2 Updated by Jakub Kosik over 8 years ago

"SQLite: cannot modify dzialki because it is a view"

#3 Updated by Giovanni Manghi over 8 years ago

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

#4 Updated by Jakub Kosik about 8 years ago

Ok, I have a clue: in my view only few column are editable by trigger (+ geometry), so geometry editing is saved with success. Attribute table scan over all fields, and provider throw error. Note that even not updated fields are written to database (same SQLite error when I try to "UPDATE ..." non-editable field on database).

There should be some checks for trigger-edit-enabled fields, or not updated fields should be omitted at save.

#5 Updated by Jakub Kosik over 7 years ago

  • Status changed from Open to Closed

Problem solved by using "spatialite_gui" for creating editable view. Spatial View is created from table with geometry (this is editable) and another view. Earlier version was created by SQL commands. Is there any extra magic in spatialite_gui?

Also available in: Atom PDF