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

organisation.fk_provider /fk_dataowner #360

Open
1 task done
sjib opened this issue Aug 6, 2024 · 6 comments
Open
1 task done

organisation.fk_provider /fk_dataowner #360

sjib opened this issue Aug 6, 2024 · 6 comments
Assignees
Labels
bug Something isn't working INTERLIS About INTERLIS exchange format (import / export)

Comments

@sjib
Copy link
Contributor

sjib commented Aug 6, 2024

Describe the bug
A clear and concise description of what the bug is.

After import of VSA organisation the fields fk_dataowner and fk_provider are empty

Expected behavior
A clear and concise description of what you expected to happen.

Should or should they be filled up or not?

Screenshots / data
If applicable, add screenshots or data to help explain your problem.

20240806_organisation fk_provider fk_dataowner_missing_on_import

Desktop (please complete the following information):

  • TWW version pre-release 2024.0
  • QGIS Version 3.38.4
  • OS windows 10

Additional context
Add any other context about the problem here.

  • to check with all other classes also - they have data in fk_dataowner / fk_provider
@sjib sjib added bug Something isn't working INTERLIS About INTERLIS exchange format (import / export) labels Aug 6, 2024
@ponceta
Copy link
Member

ponceta commented Aug 7, 2024

I thought this was on purpose since it is a loopy relation.

@sjib
Copy link
Contributor Author

sjib commented Aug 7, 2024

We now support loopy relations in tww (at least with the DEFERABLE added we have made a step forward on this) and these two attributes are in the VSA organisation dataset - so we should import them - else users are wondering what happened to them. They are also needed to distinguish if you have added your own organisations.

@sjib
Copy link
Contributor Author

sjib commented Aug 7, 2024

Update - my comment above is not correct:

Class Organisation has last_modification, but not fk_dataowner, fk_provider in INTERLIS

CLASS SIA405_BaseClass (ABSTRACT) EXTENDS Base_LV95.BaseClass =
      !!@comment STANDARDOID ist gewählte Option für Definition ANYOID aus base.ili. Weitere Infos siehe Merkblatt 2015, Kapitel 2.1.3.8 Objektidentifikatoren (OID). OBJ_ID wird nicht mehr redundant modelliert und wurde aufgehoben. 
      OID AS STANDARDOID;
      ATTRIBUTE
        !!@comment = "Letzte Aenderung des Datensatzes, andere Metaattribute neu als Beziehung"
        Letzte_Aenderung: MANDATORY INTERLIS.INTERLIS_1_DATE; 
   END SIA405_BaseClass;  

and

CLASS Organisation EXTENDS SIA405_BaseClass = 
   ATTRIBUTE
     !!@ comment = "Allgemeine Bemerkungen"
     Bemerkung: TEXT*255;
     !!@ comment = "Die Bezeichnung für Gemeinden wird gemäss BFS-Liste übernommen; für Private gemäss UID-Register, allenfalls mit Zusatz des Ortes der Filiale, falls keine separate UID dafür besteht."
     Bezeichnung: MANDATORY SIA405_Base_Abwasser_1_LV95.OrganisationBezeichnung;
     !!@ comment = "Offizielle Gemeinde Nummer gemäss Bundesamt für Statistik, bei Gemeinde zwingend, sonst leer lassen."
     Gemeindenummer: GemeindeNr;
     !!@ comment = "Kurzbezeichnung"
     Kurzbezeichnung: TEXT*12;
     Organisationstyp: MANDATORY (
       !!@ comment = "Abwasserverband"
       Abwasserverband,
       !!@ comment = "Teil einer Bundesverwaltung (z.B. Bundesamt für Umwelt, ASTRA, Armasuisse)"
       Bund,
       !!@ comment = "Gemeinde gemäss Bundesamt für Statistik"
       Gemeinde,
       !!@ comment = "Teil einer Gemeindeverwaltung, die eine Rolle übernimmt ((z.B. Geoinformation Stadt Bern) als Traegerschaft, Datenlieferant, etc. (aber nicht als Datenherr / (oeffentlicher) Eigentuemer)"
       Gemeindeabteilung,
       !!@ comment = "Genossenschaft oder Korporation: Körperschaft öffentlichen Rechts. Falls privaten Rechtes dann als Privat abbilden."
       Genossenschaft_Korporation,
       !!@ comment = "Teil einer kantonalen Verwaltung (z.B. Amt für Umweltschutz, Amt für Abwasserentsorgung)"
       Kanton,
       !!@ comment = "Privatperson oder Privatorganisation, welche im Rahmen der Entwässerungsplanung auftritt"
       Privat
     );
     !!@ comment = "Status der Organisation, damit untergegangende Organisationen nicht einfach gelöscht werden müssen und kontrolliert werden kann, ob noch Beziehungen auf untergegangene Organisationen, z.B. bei Gemeindefusion oder Konkurs einer Firma vorhanden sind"
     Status: MANDATORY (
       aktiv,
       untergegangen
     );
     !!@ comment = "Referenz zur Unternehmensidentifikation des Bundesamts fuer Statistik (www.uid.admin.ch), z.B. CHE123456789"
     UID: UID;
 UNIQUE 
     !!@comment = "!! Neben UNIQUE OID zusätzlich auch Kombination Bezeichnung, Organisationstyp, UID (Wegleitung GEP-Daten 2020)"
     Bezeichnung, Organisationstyp, UID; 
 END Organisation;

@sjib sjib changed the title organisation.fk_provider /fk_dataowner missing on import organisation.fk_provider /fk_dataowner Aug 7, 2024
@sjib sjib self-assigned this Aug 7, 2024
@cymed
Copy link
Contributor

cymed commented Aug 8, 2024

deferrable behavior - constraints support it, indexes don't
you can easily DROP/CREATE an index CONCURRENTLY, whereas with a constraint you can't

@ponceta
Copy link
Member

ponceta commented Aug 8, 2024

+1 on adding last_modification
+1 on removing fk_dataowner / fk_provider for this table

@cymed
Copy link
Contributor

cymed commented Aug 8, 2024

+1 on adding last_modification
-1 on removing fk_dataowner / fk_provider for this table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working INTERLIS About INTERLIS exchange format (import / export)
Projects
None yet
Development

No branches or pull requests

3 participants