Bug report #15937
Adding label of Joined Layer looses all features
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Unknown | ||
Affected QGIS version: | 2.18.0 | Regression?: | No |
Operating System: | Windows | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23853 |
Description
When adding labels via show labels for this layer, and a label is selected from a joined table, the result is no features are displayed. However, if a label is chosen from the main table, everything works OK.
I have three tables in MS SQL Server
table 1 = geometry table
table 2 = main table
table 3 = additional info
Layer 1 = table 1 joined to table 2, table 1 joined to table 3 (all via the same key)
Layer 1 is not visible
Layer 2 = table 1 joined to table 2, table 1 joined to table 3, table 1 joined to Layer 1 (all via the say key)
Features to be displayed are: Layer 1.name_field = "XX"
This is the only way I could think to implement the code snippet SELECT * FROM tables, WHERE parent_key = (SELECT key WHERE name_field = "XX)
With no labels are shown, the expected number of features are displayed. in Layer 2
If a label from table 1 is displayed sourced from either Layer 1 or Layer 2, it is displayed correctly
However, if a label from table 2 (either layer), then no features are displayed.
History
#1 Updated by Harry Clarke almost 8 years ago
If Layer 2 is saved as say an ESRI Shapefile, all data of the linked tables is saved, and labels work correctly as expected in the Shapefile layer.
#2 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
- Regression? set to No
#3 Updated by Jürgen Fischer about 7 years ago
- Category set to Unknown
#4 Updated by Harry Clarke over 6 years ago
- Status changed from Open to Closed
This issue appears to have been resolved in QGIS v3.2.1
#5 Updated by Giovanni Manghi over 6 years ago
- Resolution set to fixed/implemented
- Description updated (diff)