Skip to content

Setting "Relation reference" on fk table break syncronization on project #262

Description

@oudoken

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions