2

I have postgresql/postgis database setup with one to many relationship. I can successfully set it up in QGIS but i would like to keep related tables hidden from Layers Panel to keep the project "clean" since later on i might be adding more complex databases, value map tables etc..

For example, i have locations layer where each point can relate to several events in events layer. I would like to edit data in form like this so each location can be updated with new events only that events table would not be visible in Layers Panel:

enter image description here

I found solution that works in QGIS 2 but i need to set it up in QGIS 3.

Is there some way to achieve this without going into PyQGIS?

I am just starting with PyQGIS.

  • not 100% sure what you mean but I'm almost certain PostgreSQL Views (or Materialized Views) are what you want if you are working with in-DB joins only. – ThingumaBob Feb 11 at 13:01
  • Thanks for response, I Updated the question to make it clear what i want to achieve. Views, if i understand right, allow me to create joined tables and would multipy "locations" to match number of unique "events"/"location" combinations from my example and not allow me to use emebeded attribute tables in forms? – Mat Feb 11 at 18:43

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.