Bug report #14232

select features in a spatialite view leads to wrong_results

Added by Gerhard Spieles almost 9 years ago. Updated about 7 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Data Provider/SpatiaLite
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 #:22229

Description

When i select features in a spatialite view, wrong objects are selected
sample jpgs are attached

spatialite_view_layer_select_feature.jpg (152 KB) Gerhard Spieles, 2016-02-04 06:31 AM

spatialite_view_layer_selected_feature_wrong_result.jpg (145 KB) Gerhard Spieles, 2016-02-04 06:31 AM


Related issues

Related to QGIS Application - Bug report #15600: Selecting features feature in spatial views and virtual l... Open 2016-09-21
Related to QGIS Application - Bug report #19838: Cannot select correct features in Virtual Layer Closed 2018-09-13
Duplicated by QGIS Application - Bug report #14327: Selection mismatch views sqlite Closed 2016-02-18

Associated revisions

Revision f028c0bb
Added by Martin Dobias over 8 years ago

[spatialite] use view's pkey if defined in meta table (fixes #14232)

Revision 42d88848
Added by Martin Dobias over 8 years ago

Improved fix for spatialite views (fixes #14232)

Revision 780c5873
Added by Martin Dobias over 8 years ago

Improved fix for spatialite views (fixes #14232)

(cherry picked from commit 42d88848f3010365d2c9fcf84b3a8ed5d52749a1)

History

#1 Updated by Giovanni Manghi over 8 years ago

  • Priority changed from High to Severe/Regression
  • Operating System deleted (windows)
  • OS version deleted (7)

confirmed on master, is ok on 2.8.6

#2 Updated by Martin Dobias over 8 years ago

  • Status changed from Open to Closed

#3 Updated by Arnold van 't Veld over 8 years ago

  • Status changed from Closed to Reopened

I'm trying in QGIS 2.14 to select a field (without pkey) and then I see the same prob again.

Is it obligatory to have a pkey in a spatialite table?

Actually, I'm now using a table create based on a view

#4 Updated by Martin Dobias over 8 years ago

  • Status changed from Reopened to Closed

#5 Updated by Martin Dobias over 8 years ago

Backported to 2.14 branch in 780c5873f62cf60d040e776f622bc1ad4edb7e79

#6 Updated by Vincent Dionne about 7 years ago

The same problem is present in 2.18.13 when adding a spatialite layer through DB MANAGER -SQL Query.

Easy to replicate: DB Manager => SQLITE => SQL window => Select * from your_layer => add layer.

Feature selection will be wrong again.

#7 Updated by Giovanni Manghi about 7 years ago

  • Description updated (diff)
  • Priority changed from Severe/Regression to Low

Vincent Dionne wrote:

The same problem is present in 2.18.13 when adding a spatialite layer through DB MANAGER -SQL Query.

Easy to replicate: DB Manager => SQLITE => SQL window => Select * from your_layer => add layer.

Feature selection will be wrong again.

see also #15600

#8 Updated by Jürgen Fischer about 7 years ago

  • Related to Bug report #15600: Selecting features feature in spatial views and virtual layers leads to wrong results added

#9 Updated by Jürgen Fischer about 6 years ago

  • Related to Bug report #19838: Cannot select correct features in Virtual Layer added

Also available in: Atom PDF