[QGIS-Developer] issues with 1:n relations
Raymond Nijssen
r.nijssen at terglobo.nl
Tue Apr 17 10:25:19 PDT 2018
Hi Giovanni,
Not sure what you exactly did, I wasn't even aware of QGIS being able
doing any 1:n relations.
But a few months ago I had to do a more complex 1:n relation, including
adding some fields. I solved it by using a virtual layer. The
description is here:
http://www.qgis.nl/2018/02/16/english-diagrams-for-features/?lang=en
Maybe it could help you. Or maybe you know an easier way for doing this?
Btw, I would normally do this using PostGIS but this was a question from
a customer.
Ciao,
Raymond
On 17-04-18 18:23, Giovanni Manghi wrote:
> Hi all,
>
> I have recently had to test some scenario with 1:n relations in QGIS and
> I have found a few issues and would like to know if someone has them in
> its pipeline/todo list, eventually to share the effort for the fixes.
>
> Anyway I'm also interested on your feedback on the matter.
>
> 1) 1:n relations in QGIS3. They seems unusable at the moment. When
> opening a parent layer feature form, the area/space where the child
> records should show does not show/cannot be expanded.
>
>
> 2) 1:n relations in QGIS 2.18.
>
> I have tried a scenario (that to me seems not unusual at all) where both
> the parent and the child are layers/tables with a geometry.
>
> The case where the child has its own geometries does not seems well
> implemented (if implemented at all) in the context of the relation
> feature form and this causes the following:
>
> a) from within the parent feature form, if I edit the child and try add
> a new record there is no tool to allow also add/digitize the proper
> geometry. The user can still enter only the attributes and when saving I
> have seen two things happen *) In a test project using GPKGs this led
> effectively to a record orphaned of its geometry *) In a test project
> using PostGIS layers the edits are *silently* discarded, no warning, no
> error, not even in QGIS logs.
>
> b) from within the parent feature form, when toggling editing for the
> child, this is effectively put it in edit state also in the layers
> panel. So a user can "move away" the parent feature form (that it is on
> first plane) and use the standard editing tools to add a geometry to the
> child layer. When finished the attributes form pop-up and can be used to
> fill the data, with the important issue/limitation that the "referencing
> field" is *not* automatically filled as it is done when working within
> the relation form. Once saved the new record will also show in the
> relation form. This seems a partial workaround because as said the
> referencing field is not automatically filled.
>
> Am I missing something?
>
> thanks in advance for your feedback.
>
> cheers
>
> -- Giovanni --
>
>
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
--
Terglobo
Fahrenheitstraat 1
5223 BJ 's-Hertogenbosch
06 25 31 49 83
More information about the QGIS-Developer
mailing list