Bug report #15709
bad match of valeurs with virtual layer
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Unknown | ||
Affected QGIS version: | 2.16.3 | Regression?: | No |
Operating System: | Windows 7 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23632 |
Description
The values no match in the table of virtual layer with the source layer.
The difference is visible in:
- the display table
- on Identify Features tool with a specific entity (not on show all)
The labelling display is ok
see with attached files
Related issues
Associated revisions
Fix virtual layer FilterRect handling when no uid is defined (fixes #15709)
When no uid if defined, features returned have an id defined by an
autoincremented integer. So we cannot use a SQL filter here because it
would return a subset of features and then an autoincremented id that
does not correspond to ids without filters.
So in this case, all the features are requested and the rectangle
intersection is done by the provider, not by SQLite.
History
#1 Updated by Hugues Bernard about 8 years ago
The bug is also on the new version 2.18
Additional info, the virtual query is:
SELECT * FROM hafa_origin_03 WHERE indicatif LIKE '%03'
#2 Updated by Giovanni Manghi over 7 years ago
- Regression? set to No
- Easy fix? set to No
#3 Updated by Jürgen Fischer about 7 years ago
- Category set to Unknown
#4 Updated by Nyall Dawson almost 7 years ago
- Resolution set to fixed/implemented
- Status changed from Open to Closed
- Description updated (diff)
Fixed in 2.18 and 3.0
#5 Updated by Hugues Bernard almost 7 years ago
- Status changed from Closed to Reopened
The bug isn't fixed in 2.18. With the data joined at this the ticket, the problem is always present.
Tested the 2018-01-26 on version :
- rel 2.18.16-1
- rel dev 2.18.16-4
#6 Updated by Gerhard Spieles almost 7 years ago
Hi,
the behavior is similar to #15600 and spatialite views have the same problem.
#7 Updated by Jürgen Fischer almost 7 years ago
- Related to Bug report #15600: Selecting features feature in spatial views and virtual layers leads to wrong results added
#8 Updated by Hugo Mercier about 6 years ago
It is due to the virtual layer that does not have a unique id column defined.
In this case, the "id" will be an incremented integer for each row. The problem is when the identify tool is used, only one row is returned and the resulting id is then 1.
There is no easy way to automate the generation of a unique id for each row. I'm wondering if the right fix would be to prevent the identify tool to be used on layers without unique id.
#9 Updated by Hugo Mercier about 6 years ago
- Status changed from Reopened to Closed
- % Done changed from 0 to 100
Applied in changeset qgis|efe4a79687eef7866de0f02df5bf1950431356aa.