Skip to content

Relations form - if foreign key field is removed from the form of the child layer, the relation reference is not created #4309

@alex-cit

Description

@alex-cit

Description
Reported in MerginMaps/docs#721
The form for a child layer needs to contain the foreign key field, otherwise the relation reference is not created when adding child features in the mobile app.

Environment
Production

Application (+ app version, build, operating system)
mobile app v2025.8.0, Android 14
QGIS version | 3.44.4-Solothurn

Steps to reproduce

  1. Clone the documentation project https://app.merginmaps.com/projects/documentation/forms-relations/tree.
  2. In QGIS, remove the fk-uuid from the Attributes Form of the child-amenities layer using the Drag and drop designer
  3. Sync the project and open it in the mobile app
  4. Open the form of a parent feature (a park) and add a new child feature using park-amenities-relation

Actual results
The child feature is created, but does not contain the relation reference to the parent feature ( the foreign key field fk-uuid is empty).

Expected results
The relation reference should be created even if the field is not in the form - the foreign key fk-uuid should contain the uuid of the parent feature. This is how it works in QGIS.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions