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

ASSOCIATION mit OID wird nicht korrekt importiert #561

Open
webrian opened this issue Mar 15, 2025 · 0 comments
Open

ASSOCIATION mit OID wird nicht korrekt importiert #561

webrian opened this issue Mar 15, 2025 · 0 comments

Comments

@webrian
Copy link

webrian commented Mar 15, 2025

Folgendes Datenmodell:

INTERLIS 2.3;

MODEL MyModelTemplate (de)
AT "mailto:localhost"
VERSION "2025-03-14"  =

  TOPIC MyTopicTemplate =
    BASKET OID AS INTERLIS.UUIDOID;
    OID AS INTERLIS.UUIDOID;

    CLASS DO_Document =
      Titel : TEXT*20;
    END DO_Document;

    CLASS WF_Typ =
      Bezeichnung : TEXT*20;
    END WF_Typ;

    ASSOCIATION WF_RV =
    OID AS INTERLIS.UUIDOID;
      Vorschrift -- {0..*} DO_Document;
      Typ -- {0..*} WF_Typ;
    END WF_RV;

  END MyTopicTemplate;

END MyModelTemplate.

Folgende Daten:

<?xml version="1.0" encoding="UTF-8"?><TRANSFER xmlns="http://www.interlis.ch/INTERLIS2.3">
    <HEADERSECTION SENDER="ili2pg-5.1.0-58fc980cc6639b2c16a3cff8a0fa19ef1484b11c" VERSION="2.3">
        <MODELS>
            <MODEL NAME="MyModelTemplate" VERSION="2025-03-14" URI="mailto:localhost"></MODEL>
        </MODELS>
    </HEADERSECTION>
    <DATASECTION>
        <MyModelTemplate.MyTopicTemplate BID="d00f50c7-4f19-4ebd-b17c-d3d64a4d6c51">
            <MyModelTemplate.MyTopicTemplate.DO_Document TID="335f360c-7daf-4726-b007-d3e75b040cf1">
                <Titel>Dokument 1</Titel>
            </MyModelTemplate.MyTopicTemplate.DO_Document>
            <MyModelTemplate.MyTopicTemplate.WF_Typ TID="a2105608-cb4e-4c4a-ba26-6beea1e66ed0">
                <Bezeichnung>Typ 1</Bezeichnung>
            </MyModelTemplate.MyTopicTemplate.WF_Typ>
            <MyModelTemplate.MyTopicTemplate.WF_RV TID="0ebe85e1-3117-4def-b06c-cc8542584d96">
                <Vorschrift REF="335f360c-7daf-4726-b007-d3e75b040cf1"></Vorschrift>
                <Typ REF="a2105608-cb4e-4c4a-ba26-6beea1e66ed0"></Typ>
            </MyModelTemplate.MyTopicTemplate.WF_RV>
        </MyModelTemplate.MyTopicTemplate>
    </DATASECTION>
</TRANSFER>

Datenbank erstellen mit ili2gpkg:

java -jar ili2gpkg-5.2.2.jar --schemaimport --dbfile mymodel.gpkg --sqlEnableNull --createNumChecks --createUnique --createFk --createFkIdx --createTidCol --smart2Inheritance --createBasketCol --models MyModelTemplate MyModelTemplate.ili

Daten importieren:

java -jar ili2gpkg-5.2.2.jar --replace --dbfile mymodel.gpkg --importTid --importBid --dataset Baseset transfer.xtf

Als Resultat sieht die Tabelle wf_rv sieht wie folgt aus:

Image

Statt dass die TID der Beziehung in das Feld t_ili_tid geschrieben wird, werden die Spalten um eine Spalte "nach links verrutscht".

Mit ili2pg bricht dann sogar der Import ab mit:

Info: Basket MyModelTemplate.MyTopicTemplate(oid d00f50c7-4f19-4ebd-b17c-d3d64a4d6c51)...
Error: Object 0ebe85e1-3117-4def-b06c-cc8542584d96 at (line 15,col 0)
Error:   No value specified for parameter 5.

Ich gehe davon aus, dieses Problem ist mit #431 verwandt.

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

1 participant