I am experimenting with a new feature available since version 2.2 "Relations" where foreign key relations from a database can be documented, so that the QGIS UI can (auto) generate its attribute editor layout in Master-Detail / Parent-Child forms. We are trying to style a layout for:
- one Master/Parent Table (Properties [with geomety]) and a number of Detail/Child Tables:
- Parcels [with geomety]
The relationships between these layers can be defined in Project:Project Properties:Relations. Note that all child layers/tables have a single column foreign key (called "bau_guid"), all refering to the single column primary key (also called "bau_guid").
When we select "Autogenerate" for the Attribute editor layout of the Master Table/Layer Properties, QGIS will automatically generate a UI with information of the Master (Properties) and the detail layers vertical master-detail layout which can be navigated
If you want to navigate master-detail-detail relations, space will become an issue in the layout, so you can also revert to Drag-and-Drop Layout, which will create Tab pages for all detail layers.
When a change is made to the layout (even if it concerns an attribute unrelated to relations), there is a problem with the DragAndDrop tabulated layout, an error message "Error: Field does not exist in datasource" appears in the place of the detail layer/relation.
Only when I remove all "relations" from the drag and drop definition and "drag and drop" them again and "in one go" it seems to work again, until the next time anything changes in the layout.
How can we solve / work around this error?