[Qgis-user] spatial selection in parent table to edit records in child table without geometry
Janneke van Dijk
janneke.qgis at gmail.com
Fri Sep 2 00:51:05 PDT 2022
Dear all,
In Postgres, I have a parent table with geometry, and a child table
without. A relationship has been defined between the two which works for
the forms I'm using. I would like to be able to use the map to select
features in the parent table and the corresponding records in the child
table, in order to be able to edit the selected child records. I know I
can create an updateable view in postgres that would achieve this.
Is there a better/easier way to do it? A way to let the child layer
inherit the geometry from the parent? I first thought to join the parent
table to the child table, but that only joins the attributes, and
doesn't make the child table spatially selectable. Using the db manager
to create a virtual layer gives the correct query result, but the loaded
layer is not editable (as to be expected, I think) and the attribute
table is empty (maybe not expected).
I have the suspicion that this should be straightforward and I am just
overlooking the obvious. Any pointers/thoughts are appreciated.
Thank you,
Janneke
More information about the Qgis-user
mailing list