Bug report #12060
WFS: missing fields when using GetFeature on a layer with a join
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||20262|
- shapefile layer with main data
- MySQL table (view)
- linked, caching enabled.
All works well so far.
But when I do a WFS-request, I only see the shapefile's attribute fields - not the ones I joined.
I checked permissions, and even tried checking select/insert/update/delete for just the table too.
I also checked the "Fields" tab of the shapefile - I see the fields listed, with WFS checked.
#2 Updated by Giovanni Manghi over 5 years ago
- Status changed from Open to Feedback
Just to be sure, are we speaking about QGIS server here, right?
So the issue would be: if you do a join in a layer, then the same layer published (with qgis server) as WFS do not show the joined attributes, right? And also you are saying that the same layer with a join do not work at all if using QGIS as wfs client, right?
Does this happen with any type of layers and joined tables, or just specific formats?
#3 Updated by Giovanni Manghi over 5 years ago
- Category set to QGIS Server
- Status changed from Feedback to Open
- Affected QGIS version changed from 2.6.0 to master
Using QGIS as WFS client works for me for WFS layers with joined tables from QGIS server.
Anyway I confirm that the joined attributes show always empty.
This is on QGIS (server) master, not sure if it worked in previous qgis server releases, anyone that can check?
#4 Updated by Jeffrey Bostoen over 5 years ago
We are indeed talking about QGis Server.
The MySQL is on another server. If I set up the service using QGis Desktop (that's where I also perform the "join", so I'm not reading the view directly from MySQL, the join is performed by QGis), the view works fine when I view it in the application.
I check the permissions, it seems fine for:
- the layer I joined to (shapefile)
- the individual fields listed (view created by QGis)
- I even added permissions in the WFS-matrix for the table (MySQL table)
But when I then open the WFS-service using QGis, the attributes do not show up. I don't know how this worked in previous versions.
#5 Updated by Giovanni Manghi over 5 years ago
I don't know how this worked in previous versions.
this is the point, I already confirmed that joined attributes do not show in qgis server wfs layers regardless of the data type used. Now it is just a matter to confirm if it ever used to work in old releases.
#6 Updated by Jeffrey Bostoen over 5 years ago
Perhaps it is because of issues when one would insert, update, delete a field which has been joined to the layer?
If that's the case, the WMS/WFS fields should be disabled in the [Fields] tab.
Although I feel it should still allow you to do a select though.
On the other hand: I'm greateful for this, but QGis does allow a WFS Service to access all the properties of features which originate from a MySQL View in the database itself (relying on this now!)