MerginMaps / MerginMaps/geodiff
Setting "Relation reference" on fk table break syncronization on project
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 183
- Forks
- 21
- Avg merge
- 9d 11h
- Merged PRs (30d)
- 2
Description
Hello there,
Sorry if this isn't the right place—I just wanted to share something I discovered.
First off, thank you for the Mergin Maps platform—it's a wonderful project!
I noticed an issue when using a table as a 1:n relationship (for example, a table containing images linked to geometry points).
If you set the field type to "Relation reference" in the QGIS layer properties (which seems like the correct choice), and then delete the parent geometry object and synchronize from the app, no errors are reported. The geometry feature and its related record are both deleted correctly (I checked this in the GPKG database).
However, if you check the "local changes" in the Mergin Maps app, you'll see that the feature deletion is still listed. Then, when you try to synchronize again, an error saying "delete nothing" appears, and synchronization becomes stuck from that point onward.
Changing the property of the foreign key related field in QGIS from "Relation reference" to "Text" seems to resolve the issue.
Thanks and kind regards,
Rob
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce the issue with a QGIS 1:n relation using a "Relation reference" field, delete the parent geometry, and synchronize twice. Trace how the GeoPackage deletion is recorded and verify that the local-changes list clears and the second synchronization completes without the "delete nothing" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100