In QGIS 2.2, there is a bug which involves using the JOINS properties on a vector layer (that is already being joined with several other vector layers) whereby the attributes are not fully loaded.
Result_Layer > Middle_Layer > Layer_1 > Layer_2 > Layer_3
In the above case, the Result_Layer will only show the values of its own columns and their respective fields and about a dozen columns coming from the Middle_Layer and their respective values before showing NULL for the rest of the attribute table.
The number of column and field attributes I am using in total is extensive ( ~200 columns; ~20,000 fields) so I haven't tested this on a much smaller scale.
The workaround at the moment is to re-join the Result_Layer to the Middle_Layer.
I've been looking at refreshing the
mapCanvas() to see if that would somehow 'rejoin' the layers and bring back the values. I've tried the following in the Python console:
from qgis.utils import iface iface.mapCanvas().refresh()
It probably refreshes but doesn't automatically rejoin. I tried also using
self.iface.mapCanvas().refresh() but I get an error.
This is for a client who wants to stick with QGIS 2.2 and does not want to use PostGIS/SpatiaLite as suggested by @mapBaker. Therefore, the only alternative I can think of is to write a script that automatically rejoins all layers when loading up the project.
Also, as a matter of curiosity, is this problem fixed in QGIS 2.4?