1

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:

  1. schema for spatial data tables, e. g. gebaeude
  2. 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:

  1. dokument: id, bezeichnung, dateityp, pfad

  2. dok_gebaeude: id, fk_dokument, fk_gebaeude --> fk_dokument references dokument(id) and fk_gebaeude references gebaeude(id)

  3. 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?

5

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.