Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gpkg] Also read relationships defined using foreign key constraints #9279

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

nyalldawson
Copy link
Collaborator

When reading relationships, always read relationships defined using foreign key constraints regardless of whether or not the related tables extension is in use.

The related table extension only permits definition of many-to-many relationships, so there's a strong case for supporting one-to-many relationships defined outside of this extension. In fact it's what's recommended upstream: opengeospatial/geopackage#678 (comment)

@coveralls
Copy link
Collaborator

coveralls commented Feb 22, 2024

Coverage Status

coverage: 68.821% (+0.006%) from 68.815%
when pulling 9d207db on nyalldawson:gpkg_one_to_many
into 18a4515 on OSGeo:master.

ogr/ogrsf_frmts/sqlite/ogrsqlitedatasource.cpp Outdated Show resolved Hide resolved
ogr/ogrsf_frmts/sqlite/ogrsqlitedatasource.cpp Outdated Show resolved Hide resolved
ogr/ogrsf_frmts/sqlite/ogrsqlitedatasource.cpp Outdated Show resolved Hide resolved
When reading relationships, always read relationships defined using
foreign key constraints regardless of whether or not the related
tables extension is in use.

The related table extension only permits definition of many-to-many
relationships, so there's a strong case for supporting one-to-many
relationships defined outside of this extension. In fact it's what's
recommended upstream: opengeospatial/geopackage#678 (comment)
@rouault rouault added this to the 3.9.0 milestone Feb 23, 2024
@rouault rouault merged commit 48ddaf2 into OSGeo:master Feb 23, 2024
32 checks passed
@nyalldawson nyalldawson deleted the gpkg_one_to_many branch February 23, 2024 01:42
@nyalldawson
Copy link
Collaborator Author

@rouault thanks! Do you think this is appropriate for backporting?

@rouault
Copy link
Member

rouault commented Feb 23, 2024

At this stage of 3.8.x, the benefit vs risk is a bit low given than 3.8.5 will probably be the last point release in the 3.8.x series

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants