No answer. I think I'll move forward with my proposal.


On Fri, Oct 7, 2016 at 9:27 AM, Patrick Valsecchi <> wrote:

> Hi,
> I'm tasked with making QGIS a bit more usable with complex database
> schemas having a lot of relations (up to hundreds of linked tables). The
> INSPIRE people were a bit too inspired when creating their data schemas and
> now we have to try to make QGIS able to cope with that.
> My concerns with the current situation (as of QGIS master) are:
>    - We can specify the relations between the layers at the project level
>    (it's now easier with the auto-discover feature for PostGIS and
>    Spatialite). But those are only showing in the QgsAttributeForm for the 1-N
>    side (the side that doesn't have the foreign key). Why not on the N-1 side?
>    - For showing the N-1 side in the QgsAttributeForm, one can define a
>    Join in the layer's properties, but I don't see the point of having to
>    define it here as well when we have already the relations info at the
>    project level. I see a use for special joins, but for relations, I don't
>    see why we have to define it twice. And the way it's displayed is not
>    allowing to create joins or edit the joined fields.
>    - I let you imagine the look of the feature attribute form when there
>    are hundreds of directly and indirectly linked tabled. This is just not
>    usable if we display all of them directly like that. Just look at the
>    attached screen shot that shows what happens by default with only 3 tables.
>    It's already a mess.
> Now, what I propose is:
>    - Not expand the relation widget (QgsCollapsibleGroupBox) by default
>    and build it's content only when it is expanded the first time (think of
>    what would happen when you have loops in the schema).
>    - Show N-1 relations as well, in a collapsed by default
>    QgsCollapsibleGroupBox, including a way to add a new linked entry, remove
>    the link (put the FK to NULL) and delete it.
>    - Add a button to open a related feature in a new window.
> What do you guys think?
> Thanks.
Qgis-developer mailing list
List info:

Reply via email to