2

How can I store relationship in GeoPackage with QGIS and how does it function? It is hard to find an example in the help program.

4
  • 2
    in QGIS Project>Relations github.com/qgis/QGIS/pull/49504 Commented Jun 6, 2024 at 22:14
  • Was expecting to see the relation in the display. If you can, clarify with example. Commented Jun 7, 2024 at 14:06
  • Can you clarify what you mean? - The relationships show in the browser as shown above in the link. Commented Jun 7, 2024 at 14:09
  • I'm not able to attach a picture. The goal is a classic. It is to establish a relationship between an alphanumeric table and a geographic table (between foreign key and primary key), save this relationship in the geopackage and visualize it when clicking on the layer, however, this does not happen because it does not illustrate the relationship, it is as if it were not make the relationship even after having created it, through the QGIS browser (by clicking on the database in geopackage...). Also, I don't konw how you created so many relations. I only have one cardinality option: many-to-many Commented Jun 7, 2024 at 19:18

1 Answer 1

1

You can manage the one to many relationship outside of QGIS, for example in DB Browser for SQLite (-> https://sqlitebrowser.org/). After that the Parent-Child relationship is recognized as a database relationship and you will see it in the QGIS Browser:

enter image description here

2
  • Thanks for the help. So it has to be with a 3rd party program. Commented Jun 9, 2024 at 13:13
  • I'm not 100% percent sure, but to me it seems like with the ordinary OSX LTR 3.40 build it's not possible as of as it ships with GDAL 3.3 and not the required 3.6 github.com/qgis/QGIS/pull/49504 but this likely will be resolved with QT 6 github.com/qgis/QGIS/pull/60039#issuecomment-2567661209 At least I failed to achieve the desired behavior with those versions. Commented May 20 at 14:31

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.