Bug report #16869
SelectTool on Oracle layer selects always ALL features
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Data Provider/Oracle | ||
Affected QGIS version: | master | Regression?: | Yes |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 24768 |
Description
In latest master, loading an Oracle layer and trying to select a couple of features with the selectTool, ALL features are selected (or at least turn yellow).
Same machine, same layer/db, but with 2.18.10 this is ok.
Selecttool is also working OK if I select a postgis layer on that same machine/QGIS. So to me it seems Oracle provider related.
Associated revisions
[oracle] Fix provider
The oracle provider is quite broken on 3.0 for tables which require
a feature id map.
This is due to QMap<QVariant,..> not working correctly when the
keys are QVariantLists on Qt5. We had a similar issue with the
postgres provider which was resolved by changing the map
to always use QVariantLists.
Apply the same fix to oracle.
[oracle] Fix provider
The oracle provider is quite broken on 3.0 for tables which require
a feature id map.
This is due to QMap<QVariant,..> not working correctly when the
keys are QVariantLists on Qt5. We had a similar issue with the
postgres provider which was resolved by changing the map
to always use QVariantLists.
Apply the same fix to oracle.
(cherry-picked from 7ffc148)
History
#1 Updated by Jürgen Fischer over 7 years ago
Which primary key does the table have?
#2 Updated by Richard Duivenvoorde over 7 years ago
- File nokey.png added
Well, apparently none when I look into the 'open layer' dialog (see screendump).
And looking into the DDL of the table, there is NOT a primary key on one of the columns...
And trying to create a primary key, I fail because some rows have null values for fields...
Is a primary key always needed? 2.18.10 seems to work without it?
#3 Updated by Richard Duivenvoorde over 7 years ago
Additional observation (but probably same reason): no rows are shown in attribute table.
In case of such a table, QGIS can apparently load and show the features. Should/Could we maybe generate an internal id for these?
#4 Updated by Jürgen Fischer over 7 years ago
- Assignee deleted (
Jürgen Fischer)
#5 Updated by Giovanni Manghi almost 7 years ago
- Priority changed from Normal to High
#6 Updated by Nyall Dawson almost 7 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset qgis|7ffc148e356ef251e93502e3c965bf912592eda2.
#7 Updated by Giovanni Manghi almost 7 years ago
- Resolution set to fixed/implemented