I am working with a PostgreSQL/PostGIS (version 12.3/3.0.1) database and I am using QGIS (version 3.10) to visualize and work with my data. In the database I have two schemas:
- schema for spatial data tables, e. g. gebaeude
- schema for documents, e. g. dokument, dok_gebaeude (without spatial information)
I set a m:n relation between gebaeude and dokument using the table dok_gebaeude.
My tables are:
dokument: id, bezeichnung, dateityp, pfad
dok_gebaeude: id, fk_dokument, fk_gebaeude --> fk_dokument references dokument(id) and fk_gebaeude references gebaeude(id)
gebaeude: id, geom, nummer, nutzung
In QGIS I loaded the relationship with the project properties>relation manager and I can use it to connect documents (stored in table dokument) with gebaeude-objects. All work fine. BUT...
In QGIS I only need the table gebaeude and I don´t want to load the tables dokument and dok_gebaeude in my layers (the latter are only technical tables). Unfortunately it is neccessary to load all three tables (dokument, gebaeude and dok_gebaeude) in my layers in QGIS, otherwise I am not able to add the relationship in my project properties>relations.
Is there any possibility to hide or remove or not even load tables (dokument and dok_gebaeude) in my layertree without losing the relationsships?