I have a layer in my QGIS 3.4 project that comes from a Geopackage database. I load it using a query to select only a subset of columns / fields and to filter partial records.
However, the layer cannot be edited on the canvas and the only way I can see to edit the data is to use dbManager and load the whole table (right click 'Add to canvas'). Unfortunately my table has many columns, not all of which are relevant to the 'canvas' / front end, so it makes it more difficult to work with the data.
Is it possible to edit the attributes of a layer that is loaded from a query?
I recognise that if I have multiple layers sourced from one table there is a risk of conflicts if I were to try editing all the layers concurrently... Maybe we can skip over that for now, if I promise to be careful!