Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of bag of and list of #33

Open
romefi opened this issue Dec 15, 2022 · 10 comments
Open

Support of bag of and list of #33

romefi opened this issue Dec 15, 2022 · 10 comments

Comments

@romefi
Copy link

romefi commented Dec 15, 2022

We have a model with BAG {1..*} OF and LIST {1..*} OF (see Pflegeplanung_Fliessgewaesser_SH_V1_0.zip). In Model Baker those get the widget Linking Relation Editor by default. Which would be very handy, but fails when you want to use it.

bag_of_list_of

Error:
image

Though more than one children are allowed.

Any idea, why it fails and what it needs to make Linking Relation Editor work for BAG {1..*} OF and LIST {1..*} OF?

@domi4484
Copy link
Member

domi4484 commented Dec 20, 2022

@romefi the Linking Relation Editor has a "One To One" mode in which only one children can be linked. Model baker try to configure that option if it has enough information that a relation is one to one.

In this case Model Baker configures the Linking Editor correctly (also not one to one), but the editor erroneously behaves as one to one was set.

After changing the cardinality in the config, apply, and change it back to Kalendermonat_Code the widget behaves correctly and multiple children can be linked. So somehow the reading/writing of the configuration must be broken.

image

@domi4484
Copy link
Member

Some thoughts after having dug a little more:

  1. Model baker configures effectively the widget to OneToOne. But does it makes any sense to do that in a many to many configuration?

  2. The Linking relation editor enter in a sort of a mixed configuration when one to one is set parallel to a end table in a many to many configuration.

@romefi
Copy link
Author

romefi commented Jan 6, 2023

@domi4484 Thank you for the hint. With changing to "one to one relation" it works.

Of course it would be great, if Model Baker would handle it right and set the widget as expected. Would that be solved with opengisch/QgisModelBakerLibrary#49?

@domi4484
Copy link
Member

domi4484 commented Jan 6, 2023

Yes, it will be solved with the next model baker release.

@domi4484
Copy link
Member

domi4484 commented Jan 7, 2023

With the experimental version (7.4.0) of model baker it should be fixed if you want to test.

@ackmar
Copy link

ackmar commented Jan 9, 2023

Wird 'Beschriftung anzeigen' in der Bedienelementanzeige deaktiviert, dann verliert es die originäre Einstellung der Kardinalität 'one to one' und geht in den Modus 'more to one'.

image

image

@romefi
Copy link
Author

romefi commented Feb 1, 2023

@domi4484

We tested with Model Baker 7.4.0 and QGIS 3.28.3 with this INTERLIS-model Pflegeplanung_Fliessgewaesser_SH_V1_0.zip.

When we collect a new "FloraPoint" and want to add "kalender_monat", it fails and gives a PostGIS-Error

bag_of_list_of

Any idea what the problem could be?

@domi4484
Copy link
Member

domi4484 commented Feb 2, 2023

@ackmar ich kann dieses bug nicht reproduzieren, war das mit die neuste version vom plugin? (version 1.1.3 vom 5.12.2022 ist die letzte)

@romefi apparently is not only a linking editor issue. It also happen with the stock QGIS relation editor.
As long as the point is not persisted into the DB it is not possible to make links. Could be a regression in QGIS needs more investigation.

@romefi
Copy link
Author

romefi commented Feb 9, 2023

@domi4484 you're right. It's quite an ugly thing...

Any idea how many time would be needed for more investigation?

@domi4484
Copy link
Member

@romefi I think one day to find out and fix, if it doesn't turn out to be something bigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants