-
-
Notifications
You must be signed in to change notification settings - Fork 302
Description
Hello everyone,
I'm currently working on a Qfield project in offline editing dealing with different PostGIS layers to be updated on field. The last test resulted in a series of problem connected to the element ID value stored and visibile in Qfield and the corresponding one in the syncronized QGIS project. Also, a layer that is part of a 1:n relationship does not allow to add a child element in its form in Qfield environment showing the following error message: "Cannot add child feature: parent primary keys are not available". I don't know if this two issue are connected.
Reproduction Steps:
- Preparation of the project in QGIS 3.16 for the export in Qfield 1.10 in editing offline. The project contains PostGIS point layers and one of them has a 1:n relation with another table.
- Export for Qfield using the Qfield Sync plugin
- Opening the project in Qfield and adding a new point to the parent layer
- Adding with the add-button the child element inside the parent form
Expected behavior:
Qfield opens the child form for editing all the needed attributes for the child element before saving.
Observed behavior:
The error "Cannot add child feature: parent primary keys are not available" appears on screen and the child form doesn't open.
Also, ID is always equal to 0 for each new parent element while, after importing the project back in QGIS, a different number ID is stored in the Attribute Table.
This happens only with newly created element in the parent layer. It does not happen with element already existing in the parent layer in the project for which it is easily possible to add child features as expected.
Screenshots and GIFs
QField version: [Qfield 1.10 (1da006)]
Additional information:
- Problem started happening recently, didn't happen in an older version of QField: [Yes]
- Problem can be reliably reproduced, doesn't happen randomly: [Yes]
- Problem happens with all files and projects, not only some files or projects: [Yes]
Thanks in advance for your kind support and help in understanding and solving this issue,
Federica

