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

Set right basket in many-to-many association #876

Open
signedav opened this issue Feb 8, 2024 · 0 comments
Open

Set right basket in many-to-many association #876

signedav opened this issue Feb 8, 2024 · 0 comments

Comments

@signedav
Copy link
Member

signedav commented Feb 8, 2024

When we have a many-to-many association it needs to be in a basket. Having multiple datasets leads to multiple possible baskets for it. When I create a new feature that is connected over the association, I can choose it's basket, but I can't choose it for the linking-feature.

Example

0. Having this model

INTERLIS 2.3;

/* Ortsplanung as national model */
MODEL WheresTheAssoc_V1 (en) AT "https://modelbaker.ch" VERSION "2024-02-07" =

  TOPIC Infrastruktur =
    CLASS Item =
		  Text : TEXT;
    END Item;
  END Infrastruktur;

  TOPIC Unterhalt =
    DEPENDS ON WheresTheAssoc_V1.Infrastruktur;

    CLASS Instandsetzung =
		  Text : TEXT;
    END Instandsetzung;

    ASSOCIATION InstandsetzungItemAssoc =
      Item (EXTERNAL) -- {0..*} WheresTheAssoc_V1.Infrastruktur.Item;
      Instandsetzung -- {0..*} Instandsetzung;
    END InstandsetzungItemAssoc;

  END Unterhalt;
END WheresTheAssoc_V1.

1. Having those baskets

2 datasets x 2 topics -> 4 baskets
image

2. Create Item in TG

image

3. Create linked Instandsetzung in TG

Screenshot from 2024-02-08 15-53-24

But here we have the default basket selected in the Dataset Selector for "Baseset". We change to TG and store
Screenshot from 2024-02-08 15-54-14

Result

The linking table has still the default basket, what is wrong.

image

Sollution

In this case here, where we have one link to an EXTERNAL class and one link to an internal class, it could be a solution to take always the basket of the internal parent:

image

But I neither have checked out if this solves it in every case (what if both parents are external?) nor I know if it could affect the performance too much....

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

No branches or pull requests

1 participant