Dear all,

As a learning experience I am trying to make an application that was developed with python 2 and qgis 2 with a postgres backend of vs 9.3 work with python 3/qgis 3/postgres 13.

As expected, there are plenty of places where it is still not working as it should, but I have managed to upgrade the database, open the project file in qgis 3.16, and all the layers (based on views) have loaded correctly. The relationships that were stored in the project file also seem to be working correctly with the existing .ui files. I can open the parent layer form, and in the child form I can see the foreign key reflected properly, and changing as the selected parent feature is changed. All the relationship settings were set manually and stored in the project file. When I change the column preview on the left hand side of the form from parentid to any other column, the child form still shows the parentid correctly.

For testing/learning purposed I did the whole process manually from scratch in 3.16. When I now open the parent layer form, and set the column preview on the left of the form to anything else than the parentid, in the child form, where I would have expected the parentid as before, it shows the column used in the column preview.

Is this the expected behaviour? Is it possible to set this to the 'old' behavior? If so, can that also be done using python (ultimately I want to load the layers and create the relationships in python)? Below some screenshots to clarify what I described.

Thanks for your help,

Janneke

Original situation (A), behaviour as expected:

A) With locationid as column preview shows corresponding locationid in child form (the number 1)

The same when changing the column preview: (now locationid in child form is number 11288)

B) Manually newly created relationships, with column preview of the parent id shows it in the child form (note that there seems to be a box in front of another box, in another situation I have seen it looking like a greyed out combo box)

With the newly created relationship, when selecting districtid as a column preview, it is the district id that is shown in the child form, not the locationid.






_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to